[geos-commits] [SCM] GEOS branch master updated. 2c426ed5dc04d95acbd42f03881a40c5b880cfaf

git at osgeo.org git at osgeo.org
Tue Feb 26 16:12:45 PST 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  2c426ed5dc04d95acbd42f03881a40c5b880cfaf (commit)
      from  30877e674c7be8af3106e0c578802da613acc08d (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 2c426ed5dc04d95acbd42f03881a40c5b880cfaf
Author: Even Rouault <even.rouault at spatialys.com>
Date:   Fri Feb 22 19:52:55 2019 +0100

    src/algorithm/InteriorPointArea.cpp: fix -Wshadow warning (fixes #954)

diff --git a/src/algorithm/InteriorPointArea.cpp b/src/algorithm/InteriorPointArea.cpp
index 8496d58..24fef47 100644
--- a/src/algorithm/InteriorPointArea.cpp
+++ b/src/algorithm/InteriorPointArea.cpp
@@ -149,6 +149,8 @@ public:
     void
     process()
     {
+        vector<double> crossings;
+
         /**
          * This results in returning a null Coordinate
          */
@@ -159,10 +161,10 @@ public:
         interiorPoint = *polygon.getCoordinate();
 
         const LinearRing* shell = dynamic_cast<const LinearRing*>(polygon.getExteriorRing());
-        scanRing( *shell );
+        scanRing( *shell, crossings );
         for (size_t i = 0; i < polygon.getNumInteriorRing(); i++) {
             const LinearRing* hole = dynamic_cast<const LinearRing*>(polygon.getInteriorRingN(i));
-            scanRing( *hole );
+            scanRing( *hole, crossings );
         }
         findBestMidpoint(crossings);
     }
@@ -171,10 +173,9 @@ private:
     const Polygon& polygon;
     double interiorPointY;
     double interiorSectionWidth = 0.0;
-    vector<double> crossings;
     Coordinate interiorPoint;
 
-    void scanRing(const LinearRing& ring)
+    void scanRing(const LinearRing& ring, vector<double>& crossings)
     {
         // skip rings which don't cross scan line
         if ( ! intersectsHorizontalLine( ring.getEnvelopeInternal(), interiorPointY) )

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

Summary of changes:
 src/algorithm/InteriorPointArea.cpp | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list