[geos-commits] [SCM] GEOS branch main updated. 188c057cf2b0b6195201c2da51e58f87e8986373

git at osgeo.org git at osgeo.org
Tue Feb 11 15:39:43 PST 2025


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, main has been updated
       via  188c057cf2b0b6195201c2da51e58f87e8986373 (commit)
      from  0eef2191a0563fca2996139ce130d3bd5d33997b (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 188c057cf2b0b6195201c2da51e58f87e8986373
Author: Martin Davis <mtnclimb at gmail.com>
Date:   Tue Feb 11 15:38:16 2025 -0800

    Fix OrientationIndexStressTest conversion errors

diff --git a/benchmarks/algorithm/OrientationIndexStressTest.cpp b/benchmarks/algorithm/OrientationIndexStressTest.cpp
index af9e6be66..24e19677f 100644
--- a/benchmarks/algorithm/OrientationIndexStressTest.cpp
+++ b/benchmarks/algorithm/OrientationIndexStressTest.cpp
@@ -124,22 +124,22 @@ bool isConsistent(std::string tag, Coordinate p0, Coordinate p1, Coordinate p2,
 bool isConsistentDD(Coordinate p0, Coordinate p1, Coordinate p2)
 {
     return isConsistent("DD", p0, p1, p2, 
-    [](Coordinate p0, Coordinate p1, Coordinate p2) -> int {
-        return Orientation::index(p0, p1, p2);
+    [](Coordinate pt0, Coordinate pt1, Coordinate pt2) -> int {
+        return Orientation::index(pt0, pt1, pt2);
     });
 }
 
 bool isConsistentFP(Coordinate p0, Coordinate p1, Coordinate p2)
 {
     return isConsistent("FP", p0, p1, p2, 
-        [](Coordinate p0, Coordinate p1, Coordinate p2) -> int {
-            return orientationIndexFP(p0, p1, p2);
+        [](Coordinate pt0, Coordinate pt1, Coordinate pt2) -> int {
+            return orientationIndexFP(pt0, pt1, pt2);
         });
 }
 
 Coordinate randomCoord() {
-    double x = (10.0 * random()) / RAND_MAX;
-    double y = (10.0 * random()) / RAND_MAX;
+    double x = (10.0 * (double) random()) / RAND_MAX;
+    double y = (10.0 * (double) random()) / RAND_MAX;
     return Coordinate(x, y);
 }
 
@@ -162,8 +162,8 @@ void checkTest(Coordinate p0, Coordinate p1, Coordinate p2)
 
 void reportStats(std::string tag = "") {
     std::cout << tag << "Num tests: " <<  count 
-        << "  DD fail = " << failDD << " (" << round((100.0 * failDD / (double) count)) << "%)"
-        << "  FP fail = " << failFP << " (" << round((100.0 * failFP / (double) count)) << "%)"
+        << "  DD fail = " << failDD << " (" << round((100.0 * (double) failDD / (double) count)) << "%)"
+        << "  FP fail = " << failFP << " (" << round((100.0 * (double) failFP / (double) count)) << "%)"
         << std::endl;
 }
 

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

Summary of changes:
 benchmarks/algorithm/OrientationIndexStressTest.cpp | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list