[geos-commits] [SCM] GEOS branch 3.9 updated. 3fcdbcfe30d42f814ff00da49a195c8f2298186f

git at osgeo.org git at osgeo.org
Thu Jun 24 14:31:12 PDT 2021


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, 3.9 has been updated
       via  3fcdbcfe30d42f814ff00da49a195c8f2298186f (commit)
      from  d71872bc5a5b9fea27d3d9cf4031953926960af1 (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 3fcdbcfe30d42f814ff00da49a195c8f2298186f
Author: Justin Bronn <justin.bronn at maxar.com>
Date:   Thu Jun 24 11:56:05 2021 -0600

    Use `#if` instead of `#ifdef` macros for an already defined value, fixes #1116.

diff --git a/src/geom/HeuristicOverlay.cpp b/src/geom/HeuristicOverlay.cpp
index 04c4041..bb88002 100644
--- a/src/geom/HeuristicOverlay.cpp
+++ b/src/geom/HeuristicOverlay.cpp
@@ -74,7 +74,7 @@
 #define GEOS_DEBUG_HEURISTICOVERLAY_PRINT_INVALID 0
 
 
-#ifdef GEOS_DEBUG_HEURISTICOVERLAY
+#if GEOS_DEBUG_HEURISTICOVERLAY
 # include <iostream>
 # include <iomanip>
 # include <sstream>
@@ -202,13 +202,13 @@ check_valid(const Geometry& g, const std::string& label, bool doThrow = false, b
         if(! ivo.isValid()) {
             using operation::valid::TopologyValidationError;
             TopologyValidationError* err = ivo.getValidationError();
-#ifdef GEOS_DEBUG_HEURISTICOVERLAY
+#if GEOS_DEBUG_HEURISTICOVERLAY
             std::cerr << label << " is INVALID: "
                       << err->toString()
                       << " (" << std::setprecision(20)
                       << err->getCoordinate() << ")"
                       << std::endl
-#ifdef GEOS_DEBUG_HEURISTICOVERLAY_PRINT_INVALID
+#if GEOS_DEBUG_HEURISTICOVERLAY_PRINT_INVALID
                       << "<A>" << std::endl
                       << g.toString()
                       << std::endl
@@ -237,7 +237,7 @@ inline std::unique_ptr<Geometry>
 fix_self_intersections(std::unique_ptr<Geometry> g, const std::string& label)
 {
     ::geos::ignore_unused_variable_warning(label);
-#ifdef GEOS_DEBUG_HEURISTICOVERLAY
+#if GEOS_DEBUG_HEURISTICOVERLAY
     std::cerr << label << " fix_self_intersection (UnaryUnion)" << std::endl;
 #endif
 
@@ -262,18 +262,18 @@ fix_self_intersections(std::unique_ptr<Geometry> g, const std::string& label)
     switch(err->getErrorType()) {
     case TopologyValidationError::eRingSelfIntersection:
     case TopologyValidationError::eTooFewPoints: // collapsed lines
-#ifdef GEOS_DEBUG_HEURISTICOVERLAY
+#if GEOS_DEBUG_HEURISTICOVERLAY
         std::cerr << label << " ATTEMPT_TO_FIX: " << err->getErrorType() << ": " << *g << std::endl;
 #endif
         g = g->Union();
-#ifdef GEOS_DEBUG_HEURISTICOVERLAY
+#if GEOS_DEBUG_HEURISTICOVERLAY
         std::cerr << label << " ATTEMPT_TO_FIX succeeded.. " << std::endl;
 #endif
         return g;
     case TopologyValidationError::eSelfIntersection:
     // this one is within a single component, won't be fixed
     default:
-#ifdef GEOS_DEBUG_HEURISTICOVERLAY
+#if GEOS_DEBUG_HEURISTICOVERLAY
         std::cerr << label << " invalidity is: " << err->getErrorType() << std::endl;
 #endif
         return g;

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

Summary of changes:
 src/geom/HeuristicOverlay.cpp | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list