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

git at osgeo.org git at osgeo.org
Mon Dec 17 13:06:49 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  f35ce0deffcc4eb7d804f1cd6436a7fa66372a0a (commit)
      from  858123648c93a0868ebf456badd20a5fa0ab4f42 (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 f35ce0deffcc4eb7d804f1cd6436a7fa66372a0a
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Mon Dec 17 13:06:39 2018 -0800

    Quiet warnings from GCC 4.8

diff --git a/src/geom/util/Densifier.cpp b/src/geom/util/Densifier.cpp
index ff427a5..9a3fb40 100644
--- a/src/geom/util/Densifier.cpp
+++ b/src/geom/util/Densifier.cpp
@@ -48,8 +48,8 @@ namespace geom { // geos.geom
 namespace util { // geos.geom.util
 
 /* geom::util::Densifier::DensifyTransformer */
-Densifier::DensifyTransformer::DensifyTransformer(double distanceTolerance):
-	distanceTolerance(distanceTolerance)
+Densifier::DensifyTransformer::DensifyTransformer(double distTol):
+	distanceTolerance(distTol)
 {}
 
 CoordinateSequence::Ptr
@@ -73,7 +73,7 @@ Densifier::DensifyTransformer::transformPolygon(const Polygon *geom, const Geome
 {
 	Geometry::Ptr roughGeom = GeometryTransformer::transformPolygon(geom, parent);
 	// don't try and correct if the parent is going to do this
-	if (const MultiPolygon* mp=dynamic_cast<const MultiPolygon*>(parent) )
+	if (parent && parent->getGeometryTypeId() == GEOS_MULTIPOLYGON)
 	{
 		return roughGeom;
 	}
@@ -140,10 +140,10 @@ Densifier::densifyPoints(const Coordinate::Vect pts, double distanceTolerance, c
  * @return the densified geometry
  */
 Geometry::Ptr
-Densifier::densify(const Geometry *geom, double distanceTolerance)
+Densifier::densify(const Geometry *geom, double distTol)
 {
 	util::Densifier densifier(geom);
-	densifier.setDistanceTolerance(distanceTolerance);
+	densifier.setDistanceTolerance(distTol);
 	return densifier.getResultGeometry();
 }
 
diff --git a/src/operation/IsSimpleOp.cpp b/src/operation/IsSimpleOp.cpp
index 614a6dc..be361ee 100644
--- a/src/operation/IsSimpleOp.cpp
+++ b/src/operation/IsSimpleOp.cpp
@@ -214,28 +214,28 @@ IsSimpleOp::hasNonEndpointIntersection(GeometryGraph &graph)
 
 /*private*/
 bool
-IsSimpleOp::computeSimple(const geom::Geometry *geom)
+IsSimpleOp::computeSimple(const geom::Geometry *g)
 {
 	nonSimpleLocation.reset();
 
-	if (dynamic_cast<const LineString*>(geom))
-		return isSimpleLinearGeometry(geom);
+	if (dynamic_cast<const LineString*>(g))
+		return isSimpleLinearGeometry(g);
 
-	if (dynamic_cast<const LinearRing*>(geom))
-		return isSimpleLinearGeometry(geom);
+	if (dynamic_cast<const LinearRing*>(g))
+		return isSimpleLinearGeometry(g);
 
-	if (dynamic_cast<const MultiLineString*>(geom))
-		return isSimpleLinearGeometry(geom);
+	if (dynamic_cast<const MultiLineString*>(g))
+		return isSimpleLinearGeometry(g);
 
-	if (dynamic_cast<const Polygon*>(geom))
-		return isSimplePolygonal(geom);
+	if (dynamic_cast<const Polygon*>(g))
+		return isSimplePolygonal(g);
 
-	const MultiPoint* mp = dynamic_cast<const MultiPoint*>(geom);
+	const MultiPoint* mp = dynamic_cast<const MultiPoint*>(g);
 	if (mp) return isSimpleMultiPoint(*mp);
 
 	// This must be after MultiPoint test, as MultiPoint can
 	// cast cleanly into GeometryCollection
-	const GeometryCollection* gc = dynamic_cast<const GeometryCollection*>(geom);
+	const GeometryCollection* gc = dynamic_cast<const GeometryCollection*>(g);
 	if (gc)
 		return isSimpleGeometryCollection(gc);
 
@@ -250,19 +250,19 @@ IsSimpleOp::isSimpleGeometryCollection(const geom::GeometryCollection *col)
 	GeometryCollection::const_iterator it;
 	for (it = col->begin(); it < col->end(); ++it)
 	{
-		const geom::Geometry *geom = *it;
-		if (!computeSimple(geom)) return false;
+		const geom::Geometry *g = *it;
+		if (!computeSimple(g)) return false;
 	}
 	return true;
 }
 
 /*private*/
 bool
-IsSimpleOp::isSimplePolygonal(const geom::Geometry *geom)
+IsSimpleOp::isSimplePolygonal(const geom::Geometry *g)
 {
 
 	LineString::ConstVect rings;
-	LinearComponentExtracter::getLines(*geom, rings);
+	LinearComponentExtracter::getLines(*g, rings);
 	for (const geom::LineString *ring : rings)
 	{
 			if(!isSimpleLinearGeometry(ring))
diff --git a/tests/xmltester/XMLTester.cpp b/tests/xmltester/XMLTester.cpp
index 3bf734a..d2a8c9e 100644
--- a/tests/xmltester/XMLTester.cpp
+++ b/tests/xmltester/XMLTester.cpp
@@ -146,10 +146,9 @@ void dump_to_stdout( const tinyxml2::XMLNode * pParent, unsigned int indent = 0
 
     tinyxml2::XMLPrinter printer;
     pParent->Accept(&printer);
-
-
 }
 
+
 }
 
 void
diff --git a/tests/xmltester/tinyxml2/tinyxml2.cpp b/tests/xmltester/tinyxml2/tinyxml2.cpp
index 23a3a6c..ea0b125 100755
--- a/tests/xmltester/tinyxml2/tinyxml2.cpp
+++ b/tests/xmltester/tinyxml2/tinyxml2.cpp
@@ -1034,10 +1034,10 @@ char* XMLNode::ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr )
             // Declarations are only allowed at document level
             //
             // Multiple declarations are allowed but all declarations
-            // must occur before anything else. 
+            // must occur before anything else.
             //
-            // Optimized due to a security test case. If the first node is 
-            // a declaration, and the last node is a declaration, then only 
+            // Optimized due to a security test case. If the first node is
+            // a declaration, and the last node is a declaration, then only
             // declarations have so far been addded.
             bool wellLocated = false;
 

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

Summary of changes:
 src/geom/util/Densifier.cpp           | 10 +++++-----
 src/operation/IsSimpleOp.cpp          | 30 +++++++++++++++---------------
 tests/xmltester/XMLTester.cpp         |  3 +--
 tests/xmltester/tinyxml2/tinyxml2.cpp |  6 +++---
 4 files changed, 24 insertions(+), 25 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list