[geos-commits] [SCM] GEOS branch master updated. 5669633c493aff845ad0cd3f5e0d7e61ae9fda74

git at osgeo.org git at osgeo.org
Wed May 29 06:46:42 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  5669633c493aff845ad0cd3f5e0d7e61ae9fda74 (commit)
      from  2225015d8d1ebae33389c01a4751e67f365e25e7 (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 5669633c493aff845ad0cd3f5e0d7e61ae9fda74
Author: Daniel Baston <dbaston at gmail.com>
Date:   Wed May 29 09:46:27 2019 -0400

    Clear -Wshadow warning in FacetSequence

diff --git a/src/operation/distance/FacetSequence.cpp b/src/operation/distance/FacetSequence.cpp
index a948cc7..bbc1c8a 100644
--- a/src/operation/distance/FacetSequence.cpp
+++ b/src/operation/distance/FacetSequence.cpp
@@ -60,26 +60,23 @@ FacetSequence::distance(const FacetSequence& facetSeq) const
 {
     bool isPointThis = isPoint();
     bool isPointOther = facetSeq.isPoint();
-    double distance;
 
     if(isPointThis && isPointOther) {
         Coordinate pt = pts->getAt(start);
         Coordinate seqPt = facetSeq.pts->getAt(facetSeq.start);
-        distance = pt.distance(seqPt);
+        return pt.distance(seqPt);
     }
     else if(isPointThis) {
         Coordinate pt = pts->getAt(start);
-        distance = computeDistancePointLine(pt, facetSeq, nullptr);
+        return computeDistancePointLine(pt, facetSeq, nullptr);
     }
     else if(isPointOther) {
         Coordinate seqPt = facetSeq.pts->getAt(facetSeq.start);
-        distance = computeDistancePointLine(seqPt, *this, nullptr);
+        return computeDistancePointLine(seqPt, *this, nullptr);
     }
     else {
-        distance = computeDistanceLineLine(facetSeq, nullptr);
+        return computeDistanceLineLine(facetSeq, nullptr);
     }
-
-    return distance;
 }
 
 /*

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

Summary of changes:
 src/operation/distance/FacetSequence.cpp | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list