[geos-commits] [SCM] GEOS branch master updated.	dfb77838cfe82098d41106efaaf232657e604553
    git at osgeo.org 
    git at osgeo.org
       
    Sat Jun  8 18:23:21 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  dfb77838cfe82098d41106efaaf232657e604553 (commit)
      from  f7315189af5400fb6e4e2cfd2595ac2584e647be (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 dfb77838cfe82098d41106efaaf232657e604553
Author: Daniel Baston <dbaston at gmail.com>
Date:   Sat Jun 8 21:23:08 2019 -0400
    Quiet a couple of warnings
diff --git a/capi/geos_ts_c.cpp b/capi/geos_ts_c.cpp
index ae36efe..111dc08 100644
--- a/capi/geos_ts_c.cpp
+++ b/capi/geos_ts_c.cpp
@@ -4253,7 +4253,7 @@ extern "C" {
             const PrecisionModel* pm = g->getPrecisionModel();
             double cursize = pm->isFloating() ? 0 : 1.0 / pm->getScale();
             std::unique_ptr<PrecisionModel> newpm;
-            if(gridSize) {
+            if(gridSize != 0) {
                 newpm.reset(new PrecisionModel(1.0 / gridSize));
             }
             else {
@@ -4262,7 +4262,7 @@ extern "C" {
             GeometryFactory::Ptr gf =
                 GeometryFactory::create(newpm.get(), g->getSRID());
             Geometry* ret;
-            if(gridSize && cursize != gridSize) {
+            if(gridSize != 0 && cursize != gridSize) {
                 // We need to snap the geometry
                 GeometryPrecisionReducer reducer(*gf);
                 reducer.setPointwise(flags & GEOS_PREC_NO_TOPO);
diff --git a/tests/unit/io/WKTReaderTest.cpp b/tests/unit/io/WKTReaderTest.cpp
index 5dc5e4f..bbf599a 100644
--- a/tests/unit/io/WKTReaderTest.cpp
+++ b/tests/unit/io/WKTReaderTest.cpp
@@ -126,14 +126,14 @@ void object::test<6>
 
     try {
         geom.reset(wktreader.read("POLYGON( EMPTY, (1 1,2 2,1 2,1 1))"));
-        ensure(!"Didn't get expected exception");
+        fail("Didn't get expected exception");
     }
     catch(const geos::util::IllegalArgumentException& ex) {
-        ensure("Did get expected exception");
+        ensure("Got expected exception", true);
         ex.what();
     }
     catch(...) {
-        ensure(!"Got unexpected exception");
+        fail("Got unexpected execpetion.");
     }
 }
 
@@ -161,11 +161,11 @@ void object::test<7>
         ensure_distance(coords->getY(0), 0.0, 1e-12);
     }
     catch(const geos::util::IllegalArgumentException& ex) {
-        ensure("Did get expected exception");
+        ensure("Got expected exception", true);
         ex.what();
     }
     catch(...) {
-        ensure(!"Got unexpected exception");
+        fail("Got unexpected exception");
     }
 }
 
@@ -185,10 +185,10 @@ void object::test<8>
     for(size_t i = 0; i < wkt.size(); i++) {
         try {
             wktreader.read(wkt[i]);
-            ensure(!"Didn't get expected exception");
+            fail("Didn't get expected exception");
         }
         catch(...) {
-            ensure("Did get expected exception");
+            ensure("Did get expected exception", true);
         }
     }
 }
-----------------------------------------------------------------------
Summary of changes:
 capi/geos_ts_c.cpp              |  4 ++--
 tests/unit/io/WKTReaderTest.cpp | 14 +++++++-------
 2 files changed, 9 insertions(+), 9 deletions(-)
hooks/post-receive
-- 
GEOS
    
    
More information about the geos-commits
mailing list