[geos-commits] [SCM] GEOS branch master updated. 5b722cfd7c0dc7f3a5e205928397f304c60daf10
git at osgeo.org
git at osgeo.org
Wed Dec 23 15:14:50 PST 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 5b722cfd7c0dc7f3a5e205928397f304c60daf10 (commit)
from d4a14d2dcd7d7eda13a9caf686725fd0af579b4a (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 5b722cfd7c0dc7f3a5e205928397f304c60daf10
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Wed Dec 23 15:14:44 2020 -0800
Rearrange for extra short-circuit
diff --git a/src/index/chain/MonotoneChain.cpp b/src/index/chain/MonotoneChain.cpp
index cdd155d..45630f1 100644
--- a/src/index/chain/MonotoneChain.cpp
+++ b/src/index/chain/MonotoneChain.cpp
@@ -187,25 +187,26 @@ MonotoneChain::overlaps(const Coordinate& p1, const Coordinate& p2,
const Coordinate& q1, const Coordinate& q2,
double overlapTolerance) const
{
- double minq = std::min(q1.x, q2.x);
double maxq = std::max(q1.x, q2.x);
double minp = std::min(p1.x, p2.x);
- double maxp = std::max(p1.x, p2.x);
-
if (minp > (maxq + overlapTolerance))
return false;
+
+ double minq = std::min(q1.x, q2.x);
+ double maxp = std::max(p1.x, p2.x);
if (maxp < (minq - overlapTolerance))
return false;
- minq = std::min(q1.y, q2.y);
maxq = std::max(q1.y, q2.y);
minp = std::min(p1.y, p2.y);
- maxp = std::max(p1.y, p2.y);
-
if (minp > (maxq + overlapTolerance))
return false;
+
+ minq = std::min(q1.y, q2.y);
+ maxp = std::max(p1.y, p2.y);
if (maxp < (minq - overlapTolerance))
return false;
+
return true;
}
-----------------------------------------------------------------------
Summary of changes:
src/index/chain/MonotoneChain.cpp | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list