[geos-commits] [SCM] GEOS branch master updated. 4c48ad7e683323bb424fada1d7b23096934d7887

git at osgeo.org git at osgeo.org
Mon Feb 1 13:48:59 PST 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, master has been updated
       via  4c48ad7e683323bb424fada1d7b23096934d7887 (commit)
      from  0965ce66c010eb0a28ae75aa6aa5bcb370b0958a (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 4c48ad7e683323bb424fada1d7b23096934d7887
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Mon Feb 1 13:48:54 2021 -0800

    Remove incorrect assertion in LineBuilder

diff --git a/include/geos/operation/overlayng/LineBuilder.h b/include/geos/operation/overlayng/LineBuilder.h
index 58055e6..2c77360 100644
--- a/include/geos/operation/overlayng/LineBuilder.h
+++ b/include/geos/operation/overlayng/LineBuilder.h
@@ -76,7 +76,7 @@ private:
     int opCode;
     const geom::GeometryFactory* geometryFactory;
     bool hasResultArea;
-    int inputAreaIndex;
+    int8_t inputAreaIndex;
     std::vector<std::unique_ptr<geom::LineString>> lines;
 
     /**
diff --git a/include/geos/operation/overlayng/OverlayLabel.h b/include/geos/operation/overlayng/OverlayLabel.h
index 6738e1b..188c384 100644
--- a/include/geos/operation/overlayng/OverlayLabel.h
+++ b/include/geos/operation/overlayng/OverlayLabel.h
@@ -204,7 +204,7 @@ public:
     * @param index
     * @return
     */
-    bool isLineInArea(uint8_t index) const;
+    bool isLineInArea(int8_t index) const;
     bool isHole(uint8_t index) const;
     bool isCollapse(uint8_t index) const;
     Location getLineLocation(uint8_t index) const;
diff --git a/include/geos/operation/overlayng/OverlayLabel.inl b/include/geos/operation/overlayng/OverlayLabel.inl
index 18a914e..6bbc317 100644
--- a/include/geos/operation/overlayng/OverlayLabel.inl
+++ b/include/geos/operation/overlayng/OverlayLabel.inl
@@ -123,7 +123,7 @@ OverlayLabel::isLineLocationUnknown(int index) const
 
 /*public*/
 INLINE bool
-OverlayLabel::isLineInArea(uint8_t index) const
+OverlayLabel::isLineInArea(int8_t index) const
 {
     if (index == 0) {
         return aLocLine == Location::INTERIOR;
diff --git a/src/operation/overlayng/LineBuilder.cpp b/src/operation/overlayng/LineBuilder.cpp
index 2b9dada..47188d2 100644
--- a/src/operation/overlayng/LineBuilder.cpp
+++ b/src/operation/overlayng/LineBuilder.cpp
@@ -112,8 +112,7 @@ LineBuilder::isResultLine(const OverlayLabel* lbl) const
         * because if line edges are present then there is only one input area,
         * and the result area must be the same as the input area.
         */
-        assert(inputAreaIndex == 0 || inputAreaIndex == 1);
-        if (hasResultArea && lbl->isLineInArea(static_cast<uint8_t>(inputAreaIndex)))
+        if (hasResultArea && lbl->isLineInArea(inputAreaIndex))
             return false;
     }
 

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

Summary of changes:
 include/geos/operation/overlayng/LineBuilder.h    | 2 +-
 include/geos/operation/overlayng/OverlayLabel.h   | 2 +-
 include/geos/operation/overlayng/OverlayLabel.inl | 2 +-
 src/operation/overlayng/LineBuilder.cpp           | 3 +--
 4 files changed, 4 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list