[geos-commits] [SCM] GEOS branch master updated. 69d08be94284cba13455689cb84a5e1704bc54b5

git at osgeo.org git at osgeo.org
Tue Dec 4 13:27:57 PST 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GEOS".

The branch, master has been updated
       via  69d08be94284cba13455689cb84a5e1704bc54b5 (commit)
       via  c3446ae16a5c81986ecb7fb5f16e4687cccece5b (commit)
       via  ad2319bbc07c172d9890f7c3fa80314e8824a270 (commit)
       via  49a2c077fb7181334cafe29f19d7a7db41f36338 (commit)
      from  ce0449c9d5ca8fb31de13ee32f095567696ec837 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 69d08be94284cba13455689cb84a5e1704bc54b5
Merge: c3446ae 49a2c07
Author: Daniel Baston <dbaston at gmail.com>
Date:   Tue Dec 4 16:27:47 2018 -0500

    Merge branch 'unique-ptr-fssif'


commit c3446ae16a5c81986ecb7fb5f16e4687cccece5b
Merge: ce0449c ad2319b
Author: Daniel Baston <dbaston at gmail.com>
Date:   Tue Dec 4 16:27:21 2018 -0500

    Merge branch 'fix-shadow-warning'


commit ad2319bbc07c172d9890f7c3fa80314e8824a270
Author: Daniel Baston <dbaston at gmail.com>
Date:   Tue Dec 4 13:17:10 2018 -0500

    Make new methods static

diff --git a/include/geos/operation/overlay/OverlayOp.h b/include/geos/operation/overlay/OverlayOp.h
index 9352344..b3991c7 100644
--- a/include/geos/operation/overlay/OverlayOp.h
+++ b/include/geos/operation/overlay/OverlayOp.h
@@ -332,7 +332,7 @@ private:
 	* For empty result, what is the correct geometry type to apply to
 	* the empty?
 	*/
-	geom::Dimension::DimensionType resultDimension(OverlayOp::OpCode overlayOpCode,
+	static geom::Dimension::DimensionType resultDimension(OverlayOp::OpCode overlayOpCode,
 		const geom::Geometry *g0, const geom::Geometry *g1);
 
 	/**
@@ -348,7 +348,7 @@ private:
 	* * #opDIFFERENCE - result has the dimension of the left-hand input
 	* * #opSYMDIFFERENCE - result has the dimension of the highest input dimension
 	*/
-	geom::Geometry* createEmptyResult(
+	static geom::Geometry* createEmptyResult(
 		OverlayOp::OpCode overlayOpCode, const geom::Geometry *a,
 		const geom::Geometry *b, const geom::GeometryFactory *geomFact);
 

commit 49a2c077fb7181334cafe29f19d7a7db41f36338
Author: Daniel Baston <dbaston at gmail.com>
Date:   Tue Dec 4 13:07:20 2018 -0500

    Use unique_ptr in FastSegmentSetIntersectionFinder

diff --git a/include/geos/noding/FastSegmentSetIntersectionFinder.h b/include/geos/noding/FastSegmentSetIntersectionFinder.h
index f5c9049..2d72ebf 100644
--- a/include/geos/noding/FastSegmentSetIntersectionFinder.h
+++ b/include/geos/noding/FastSegmentSetIntersectionFinder.h
@@ -23,6 +23,7 @@
 #include <geos/noding/SegmentString.h>
 #include <geos/noding/MCIndexSegmentSetMutualIntersector.h>
 
+#include <memory>
 
 //forward declarations
 namespace geos {
@@ -49,14 +50,14 @@ namespace noding { // geos::noding
 class FastSegmentSetIntersectionFinder
 {
 private:
-	MCIndexSegmentSetMutualIntersector * segSetMutInt;
-	geos::algorithm::LineIntersector * lineIntersector;
+	std::unique_ptr<MCIndexSegmentSetMutualIntersector> segSetMutInt;
+	std::unique_ptr<geos::algorithm::LineIntersector> lineIntersector;
 
 protected:
 public:
 	FastSegmentSetIntersectionFinder( SegmentString::ConstVect * baseSegStrings);
 
-	~FastSegmentSetIntersectionFinder();
+	~FastSegmentSetIntersectionFinder() = default;
 
 	/**
 	 * Gets the segment set intersector used by this class.
@@ -64,9 +65,9 @@ public:
 	 *
 	 * @return the segment set intersector used
 	 */
-	SegmentSetMutualIntersector * getSegmentSetIntersector()
+	const SegmentSetMutualIntersector * getSegmentSetIntersector() const
 	{
-		return segSetMutInt;
+		return segSetMutInt.get();
 	}
 
 	bool intersects( SegmentString::ConstVect * segStrings);
diff --git a/src/noding/FastSegmentSetIntersectionFinder.cpp b/src/noding/FastSegmentSetIntersectionFinder.cpp
index b48be16..b254f8d 100644
--- a/src/noding/FastSegmentSetIntersectionFinder.cpp
+++ b/src/noding/FastSegmentSetIntersectionFinder.cpp
@@ -45,19 +45,11 @@ FastSegmentSetIntersectionFinder( noding::SegmentString::ConstVect * baseSegStri
 	segSetMutInt->setBaseSegments( baseSegStrings);
 }
 
-FastSegmentSetIntersectionFinder::
-~FastSegmentSetIntersectionFinder()
-{
-	delete lineIntersector;
-	delete segSetMutInt;
-}
-
-
 bool
 FastSegmentSetIntersectionFinder::
 intersects( noding::SegmentString::ConstVect * segStrings)
 {
-	SegmentIntersectionDetector intFinder( lineIntersector);
+	SegmentIntersectionDetector intFinder(lineIntersector.get());
 
 	return this->intersects( segStrings, &intFinder);
 }

-----------------------------------------------------------------------

Summary of changes:
 include/geos/noding/FastSegmentSetIntersectionFinder.h | 11 ++++++-----
 include/geos/operation/overlay/OverlayOp.h             |  4 ++--
 src/noding/FastSegmentSetIntersectionFinder.cpp        | 10 +---------
 3 files changed, 9 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list