[geos-commits] [SCM] GEOS branch master updated. 264494aff6d14d534ebea29e6a940be6d47c3d03

git at osgeo.org git at osgeo.org
Mon Aug 6 15:05:41 PDT 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  264494aff6d14d534ebea29e6a940be6d47c3d03 (commit)
       via  c05ad7552dab1b8a9e49bc974a9f557c4c451350 (commit)
      from  e7d54545d7986e2acc55af295fc498da92cd0de6 (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 264494aff6d14d534ebea29e6a940be6d47c3d03
Merge: e7d5454 c05ad75
Author: Kurt Schwehr <schwehr at google.com>
Date:   Mon Aug 6 15:05:41 2018 -0700

    Merge branch 'size-empty-849' of goatbar/geos into master


commit c05ad7552dab1b8a9e49bc974a9f557c4c451350
Author: Kurt Schwehr <schwehr at google.com>
Date:   Mon Aug 6 11:19:59 2018 -0700

    size() == 0 -> empty() (#849)
    
    clang-tidy: readability-container-size-empty size() == 0 can be replaced with empty()
    
    ​https://clang.llvm.org/extra/clang-tidy/checks/readability-container-size-empty.html

diff --git a/src/geom/CoordinateArraySequence.cpp b/src/geom/CoordinateArraySequence.cpp
index f2603ec..04c786d 100644
--- a/src/geom/CoordinateArraySequence.cpp
+++ b/src/geom/CoordinateArraySequence.cpp
@@ -95,7 +95,7 @@ CoordinateArraySequence::getDimension() const
     if( dimension != 0 )
         return dimension;
 
-    if( vect->size() == 0 )
+    if( vect->empty() )
         return 3;
 
     if( ISNAN((*vect)[0].z) )
diff --git a/src/geomgraph/EdgeEndStar.cpp b/src/geomgraph/EdgeEndStar.cpp
index b23b015..3310cbc 100644
--- a/src/geomgraph/EdgeEndStar.cpp
+++ b/src/geomgraph/EdgeEndStar.cpp
@@ -56,7 +56,7 @@ Coordinate&
 EdgeEndStar::getCoordinate()
 {
 	static Coordinate nullCoord(DoubleNotANumber, DoubleNotANumber, DoubleNotANumber);
-	if (edgeMap.size()==0) return nullCoord;
+	if (edgeMap.empty()) return nullCoord;
 
 	EdgeEndStar::iterator it=begin();
 	EdgeEnd *e=*it;
@@ -215,7 +215,7 @@ EdgeEndStar::checkAreaLabelsConsistent(int geomIndex)
 	// the left side of the edge
 
 	// if no edges, trivially consistent
-	if (edgeMap.size()==0) return true;
+	if (edgeMap.empty()) return true;
 
 	// initialize startLoc to location of last L side (if any)
 	assert(*rbegin());
@@ -366,4 +366,3 @@ operator<< (std::ostream& os, const EdgeEndStar& es)
 
 } // namespace geos.geomgraph
 } // namespace geos
-
diff --git a/src/operation/buffer/SubgraphDepthLocater.cpp b/src/operation/buffer/SubgraphDepthLocater.cpp
index 72a9a25..5229f5c 100644
--- a/src/operation/buffer/SubgraphDepthLocater.cpp
+++ b/src/operation/buffer/SubgraphDepthLocater.cpp
@@ -148,7 +148,7 @@ SubgraphDepthLocater::getDepth(const Coordinate& p)
 	findStabbedSegments(p, stabbedSegments);
 
 	// if no segments on stabbing line subgraph must be outside all others
-	if (stabbedSegments.size()==0) return 0;
+	if (stabbedSegments.empty()) return 0;
 
 	sort(stabbedSegments.begin(), stabbedSegments.end(), DepthSegmentLessThen());
 
diff --git a/src/operation/linemerge/LineSequencer.cpp b/src/operation/linemerge/LineSequencer.cpp
index 69931ee..f55564e 100644
--- a/src/operation/linemerge/LineSequencer.cpp
+++ b/src/operation/linemerge/LineSequencer.cpp
@@ -232,7 +232,7 @@ LineSequencer::buildSequencedGeometry(const Sequences& sequences)
 		}
 	}
 
-	if ( lines->size() == 0 ) {
+	if ( lines->empty() ) {
 		return nullptr;
 	} else {
 		Geometry::NonConstVect *l=lines.get();
diff --git a/src/operation/overlay/LineBuilder.cpp b/src/operation/overlay/LineBuilder.cpp
index 9994c0e..6b13d68 100644
--- a/src/operation/overlay/LineBuilder.cpp
+++ b/src/operation/overlay/LineBuilder.cpp
@@ -225,7 +225,7 @@ LineBuilder::propagateZ(CoordinateSequence *cs)
 	cerr<<"  found "<<v3d.size()<<" 3d vertexes"<<endl;
 #endif
 
-	if ( v3d.size() == 0 )
+	if ( v3d.empty() )
 	{
 #if GEOS_DEBUG
 		cerr<<"  nothing to do"<<endl;
@@ -318,4 +318,3 @@ LineBuilder::labelIsolatedLine(Edge *e, int targetIndex)
 } // namespace geos.operation.overlay
 } // namespace geos.operation
 } // namespace geos
-

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

Summary of changes:
 src/geom/CoordinateArraySequence.cpp          | 2 +-
 src/geomgraph/EdgeEndStar.cpp                 | 5 ++---
 src/operation/buffer/SubgraphDepthLocater.cpp | 2 +-
 src/operation/linemerge/LineSequencer.cpp     | 2 +-
 src/operation/overlay/LineBuilder.cpp         | 3 +--
 5 files changed, 6 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list