mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-24 10:02:29 +01:00
0509e0aace
Plus added a PR to fix building with geos 3.6. Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
60 lines
2 KiB
Diff
60 lines
2 KiB
Diff
diff -Naur osgearth-osgearth-2.8-orig/src/osgEarthSymbology/GEOS osgearth-osgearth-2.8/src/osgEarthSymbology/GEOS
|
|
--- osgearth-osgearth-2.8-orig/src/osgEarthSymbology/GEOS 2016-09-15 17:19:21.000000000 +0300
|
|
+++ osgearth-osgearth-2.8/src/osgEarthSymbology/GEOS 2017-02-02 19:43:19.103864300 +0300
|
|
@@ -26,6 +26,7 @@
|
|
#include <osgEarthSymbology/Style>
|
|
#include <osgEarthSymbology/Geometry>
|
|
#include <geos/geom/Geometry.h>
|
|
+#include <geos/geom/GeometryFactory.h>
|
|
|
|
namespace osgEarth { namespace Symbology
|
|
{
|
|
@@ -45,7 +46,7 @@
|
|
void disposeGeometry(geos::geom::Geometry* input);
|
|
|
|
protected:
|
|
- geos::geom::GeometryFactory* _factory;
|
|
+ geos::geom::GeometryFactory::unique_ptr _factory;
|
|
};
|
|
|
|
} } // namespace osgEarth::Features
|
|
diff -Naur osgearth-osgearth-2.8-orig/src/osgEarthSymbology/GEOS.cpp osgearth-osgearth-2.8/src/osgEarthSymbology/GEOS.cpp
|
|
--- osgearth-osgearth-2.8-orig/src/osgEarthSymbology/GEOS.cpp 2016-09-15 17:19:21.000000000 +0300
|
|
+++ osgearth-osgearth-2.8/src/osgEarthSymbology/GEOS.cpp 2017-02-02 19:44:46.772878700 +0300
|
|
@@ -67,7 +67,7 @@
|
|
}
|
|
|
|
geom::Geometry*
|
|
- import( const Symbology::Geometry* input, const geom::GeometryFactory* f )
|
|
+ import( const Symbology::Geometry* input, const geom::GeometryFactory::unique_ptr f )
|
|
{
|
|
geom::Geometry* output = 0L;
|
|
|
|
@@ -216,7 +216,7 @@
|
|
geos::geom::PrecisionModel* pm = new geos::geom::PrecisionModel(geom::PrecisionModel::FLOATING);
|
|
|
|
// Factory will clone the PM
|
|
- _factory = new geos::geom::GeometryFactory( pm );
|
|
+ _factory = geos::geom::GeometryFactory::create( pm );
|
|
|
|
// Delete the template.
|
|
delete pm;
|
|
@@ -224,7 +224,6 @@
|
|
|
|
GEOSContext::~GEOSContext()
|
|
{
|
|
- delete _factory;
|
|
}
|
|
|
|
geom::Geometry*
|
|
@@ -331,10 +330,7 @@
|
|
{
|
|
if (input)
|
|
{
|
|
- geom::GeometryFactory* f = const_cast<geom::GeometryFactory*>(input->getFactory());
|
|
_factory->destroyGeometry(input);
|
|
- if ( f != _factory )
|
|
- delete f;
|
|
}
|
|
}
|
|
|