[geos-commits] [SCM] GEOS branch master updated. b39c039d89c67c7635f0e61be873f3c2ab3d2f96

git at osgeo.org git at osgeo.org
Wed Sep 4 19:03:36 PDT 2019


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  b39c039d89c67c7635f0e61be873f3c2ab3d2f96 (commit)
      from  8eaa475d27ab262489c3b88ced922f30d4dc136f (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 b39c039d89c67c7635f0e61be873f3c2ab3d2f96
Author: Daniel Baston <dbaston at gmail.com>
Date:   Wed Sep 4 22:03:26 2019 -0400

    Use unique_ptr in NodedSegmentString

diff --git a/include/geos/noding/NodedSegmentString.h b/include/geos/noding/NodedSegmentString.h
index 6db0d2d..35875cf 100644
--- a/include/geos/noding/NodedSegmentString.h
+++ b/include/geos/noding/NodedSegmentString.h
@@ -101,10 +101,7 @@ public:
         , pts(newPts)
     {}
 
-    ~NodedSegmentString() override
-    {
-        delete pts;
-    }
+    ~NodedSegmentString() override = default;
 
     /** \brief
      * Adds an intersection node for a given point and segment to this segment string.
@@ -201,7 +198,7 @@ private:
 
     SegmentNodeList nodeList;
 
-    geom::CoordinateSequence* pts;
+    std::unique_ptr<geom::CoordinateSequence> pts;
 
     static int safeOctant(const geom::Coordinate& p0, const geom::Coordinate& p1);
 
diff --git a/src/noding/NodedSegmentString.cpp b/src/noding/NodedSegmentString.cpp
index d092c50..9a36563 100644
--- a/src/noding/NodedSegmentString.cpp
+++ b/src/noding/NodedSegmentString.cpp
@@ -157,7 +157,7 @@ NodedSegmentString::getCoordinate(size_t i) const
 geom::CoordinateSequence*
 NodedSegmentString::getCoordinates() const
 {
-    return pts;
+    return pts.get();
 }
 
 /* virtual public */

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

Summary of changes:
 include/geos/noding/NodedSegmentString.h | 7 ++-----
 src/noding/NodedSegmentString.cpp        | 2 +-
 2 files changed, 3 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list