[geos-commits] [SCM] GEOS branch main updated. f20da918c2b5d1edff7b2ac076332763792104ef

git at osgeo.org git at osgeo.org
Wed Jul 9 09:23:24 PDT 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  f20da918c2b5d1edff7b2ac076332763792104ef (commit)
      from  a6d0ca80283a28c010fcb124f9254eae02fa42a6 (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 f20da918c2b5d1edff7b2ac076332763792104ef
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Wed Jul 9 09:07:24 2025 -0700

    Address build issues on 32-bit hosts

diff --git a/include/geos/algorithm/distance/DiscreteFrechetDistance.h b/include/geos/algorithm/distance/DiscreteFrechetDistance.h
index a82952afb..819a4b146 100644
--- a/include/geos/algorithm/distance/DiscreteFrechetDistance.h
+++ b/include/geos/algorithm/distance/DiscreteFrechetDistance.h
@@ -342,7 +342,8 @@ public:
             {};
 
         double get(std::size_t i, std::size_t j) const override {
-            std::size_t key = i << 32 | j;
+            static constexpr std::size_t halfsz = sizeof(std::size_t) * 4;
+            std::size_t key = i << halfsz | j;
             auto it_found = m_matrix.find(key);
             if (it_found != m_matrix.end()) {
                 return (*it_found).second;
@@ -353,12 +354,14 @@ public:
         };
 
         void set(std::size_t i, std::size_t j, double value) override {
-            std::size_t key = i << 32 | j;
+            static constexpr std::size_t halfsz = sizeof(std::size_t) * 4;
+            std::size_t key = i << halfsz | j;
             m_matrix[key] = value;
         };
 
         bool isValueSet(std::size_t i, std::size_t j) const override {
-            std::size_t key = i << 32 | j;
+            static constexpr std::size_t halfsz = sizeof(std::size_t) * 4;
+            std::size_t key = i << halfsz | j;
             auto it_found = m_matrix.find(key);
             return it_found != m_matrix.end();
         };

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

Summary of changes:
 include/geos/algorithm/distance/DiscreteFrechetDistance.h | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list