[geos-commits] [SCM] GEOS branch master updated. 55307b6e233fb7ff25acb200450cbbf8c40d4498

git at osgeo.org git at osgeo.org
Thu Apr 23 08:55:08 PDT 2020


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  55307b6e233fb7ff25acb200450cbbf8c40d4498 (commit)
      from  658b865930b15b733bf108ebd1009eea64d5e9fa (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 55307b6e233fb7ff25acb200450cbbf8c40d4498
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Thu Apr 23 08:55:00 2020 -0700

    quiet compiler warnings (clang)

diff --git a/include/geos/operation/buffer/OffsetCurveSetBuilder.h b/include/geos/operation/buffer/OffsetCurveSetBuilder.h
index 4162e0c..abe99d3 100644
--- a/include/geos/operation/buffer/OffsetCurveSetBuilder.h
+++ b/include/geos/operation/buffer/OffsetCurveSetBuilder.h
@@ -115,7 +115,7 @@ private:
 
     void addPolygon(const geom::Polygon* p);
 
-    void addRingBothSides(const geom::CoordinateSequence* coord, double distance);
+    void addRingBothSides(const geom::CoordinateSequence* coord, double p_distance);
 
     /**
      * Add an offset curve for a polygon ring.
diff --git a/src/operation/buffer/OffsetCurveBuilder.cpp b/src/operation/buffer/OffsetCurveBuilder.cpp
index 1629c26..42283d5 100644
--- a/src/operation/buffer/OffsetCurveBuilder.cpp
+++ b/src/operation/buffer/OffsetCurveBuilder.cpp
@@ -166,13 +166,13 @@ OffsetCurveBuilder::getSingleSidedLineCurve(const CoordinateSequence* inputPts,
 
 /*public*/
 bool
-OffsetCurveBuilder::isLineOffsetEmpty(double distance)
+OffsetCurveBuilder::isLineOffsetEmpty(double p_distance)
 {
     // a zero width buffer of a line or point is empty
-    if (distance == 0.0) return true;
+    if (p_distance == 0.0) return true;
     // a negative width buffer of a line or point is empty,
     // except for single-sided buffers, where the sign indicates the side
-    if (distance < 0.0 && ! bufParams.isSingleSided()) return true;
+    if (p_distance < 0.0 && ! bufParams.isSingleSided()) return true;
     return false;
 }
 
diff --git a/src/operation/buffer/OffsetCurveSetBuilder.cpp b/src/operation/buffer/OffsetCurveSetBuilder.cpp
index 0f548a9..e982065 100644
--- a/src/operation/buffer/OffsetCurveSetBuilder.cpp
+++ b/src/operation/buffer/OffsetCurveSetBuilder.cpp
@@ -290,14 +290,14 @@ OffsetCurveSetBuilder::addPolygon(const Polygon* p)
 
 /* private */
 void
-OffsetCurveSetBuilder::addRingBothSides(const CoordinateSequence* coord, double distance)
+OffsetCurveSetBuilder::addRingBothSides(const CoordinateSequence* coord, double p_distance)
 {
-    addRingSide(coord, distance,
+    addRingSide(coord, p_distance,
                 Position::LEFT,
                 Location::EXTERIOR, Location::INTERIOR);
     /* Add the opposite side of the ring
     */
-    addRingSide(coord, distance,
+    addRingSide(coord, p_distance,
                 Position::RIGHT,
                 Location::INTERIOR, Location::EXTERIOR);
 }
diff --git a/tests/unit/capi/GEOSSTRtreeTest.cpp b/tests/unit/capi/GEOSSTRtreeTest.cpp
index fd41083..daf2675 100644
--- a/tests/unit/capi/GEOSSTRtreeTest.cpp
+++ b/tests/unit/capi/GEOSSTRtreeTest.cpp
@@ -251,8 +251,8 @@ void object::test<7>
     GEOSSTRtree* tree = GEOSSTRtree_create(16);
     GEOSGeometry* q = GEOSGeomFromWKT("POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))");
     GEOSSTRtree_query(tree, q, [](void* item, void* userdata) {
-        assert(item); // make unused parameter warning go away
-        assert(userdata);
+        (void)(item); // make unused parameter warning go away
+        (void)(userdata); // make unused parameter warning go away
     }, nullptr);
 
     GEOSGeom_destroy(q);
diff --git a/tests/unit/math/DDTest.cpp b/tests/unit/math/DDTest.cpp
index 00a29b8..177ec48 100644
--- a/tests/unit/math/DDTest.cpp
+++ b/tests/unit/math/DDTest.cpp
@@ -204,13 +204,13 @@ struct test_dd_data {
      *    Pi / 4  =  4 arctan(1/5) - arctan(1/239)
      */
 
-    DD computePiByMachin()
+    DD computePiByMachine()
     {
         DD t1 = DD(1.0) / DD(5.0);
         DD t2 = DD(1.0) / DD(239.0);
-        DD pi4 = (DD(4.0) * arctan(t1)) - arctan(t2);
-        DD pi = DD(4.0) * pi4;
-        return pi;
+        DD pie4 = (DD(4.0) * arctan(t1)) - arctan(t2);
+        DD pie = DD(4.0) * pie4;
+        return pie;
     }
 
     test_dd_data():
@@ -236,7 +236,7 @@ template<>
 void object::test<1>
 ()
 {
-    DD testPi = computePiByMachin();
+    DD testPi = computePiByMachine();
     double err = std::abs((testPi - pi).doubleValue());
     // std::cout << "Difference from PI = " << err << std::endl;
     ensure("Test PI calculation", err < 8*eps);
diff --git a/tests/xmltester/tinyxml2/tinyxml2.cpp b/tests/xmltester/tinyxml2/tinyxml2.cpp
index 182f406..414ca6a 100755
--- a/tests/xmltester/tinyxml2/tinyxml2.cpp
+++ b/tests/xmltester/tinyxml2/tinyxml2.cpp
@@ -432,17 +432,17 @@ void XMLUtil::ConvertUTF32ToUTF8( unsigned long input, char* output, int* length
             --output;
             *output = (char)((input | BYTE_MARK) & BYTE_MASK);
             input >>= 6;
-            //fall through
+            // fall through
         case 3:
             --output;
             *output = (char)((input | BYTE_MARK) & BYTE_MASK);
             input >>= 6;
-            //fall through
+            // fall through
         case 2:
             --output;
             *output = (char)((input | BYTE_MARK) & BYTE_MASK);
             input >>= 6;
-            //fall through
+            // fall through
         case 1:
             --output;
             *output = (char)(input | FIRST_BYTE_MARK[*length]);

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

Summary of changes:
 include/geos/operation/buffer/OffsetCurveSetBuilder.h |  2 +-
 src/operation/buffer/OffsetCurveBuilder.cpp           |  6 +++---
 src/operation/buffer/OffsetCurveSetBuilder.cpp        |  6 +++---
 tests/unit/capi/GEOSSTRtreeTest.cpp                   |  4 ++--
 tests/unit/math/DDTest.cpp                            | 10 +++++-----
 tests/xmltester/tinyxml2/tinyxml2.cpp                 |  6 +++---
 6 files changed, 17 insertions(+), 17 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list