[geos-commits] [SCM] GEOS branch 3.7 updated. 8e8510b35827baa769ed8b84da39aaa9fb0fc38c

git at osgeo.org git at osgeo.org
Wed Sep 18 10:20:38 PDT 2019


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.7 has been updated
       via  8e8510b35827baa769ed8b84da39aaa9fb0fc38c (commit)
      from  bd39ea219cbdd6682cb47541cb1e31c6eba5ecbc (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 8e8510b35827baa769ed8b84da39aaa9fb0fc38c
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Wed Sep 18 10:20:18 2019 -0700

    Go back to int64 and somewhat undefined behaviour for nbits == 63

diff --git a/include/geos/constants.h b/include/geos/constants.h
index f58207e..be38a8d 100644
--- a/include/geos/constants.h
+++ b/include/geos/constants.h
@@ -30,7 +30,6 @@ typedef __int64 int64;
 #include <cmath>
 #include <limits>
 #include <cinttypes>
-#include <stdint.h>
 
 #ifdef M_PI
 #undef M_PI
diff --git a/src/precision/CommonBits.cpp b/src/precision/CommonBits.cpp
index f54482d..96eb820 100644
--- a/src/precision/CommonBits.cpp
+++ b/src/precision/CommonBits.cpp
@@ -44,10 +44,10 @@ int64
 CommonBits::zeroLowerBits(int64 bits, int nBits)
 {
 	if (nBits >= 64 || nBits < 1) return 0;
-	const uint64_t bits_ = static_cast<uint64_t>(bits);
-	const uint64_t invMask = (1ull << nBits) - 1;
-	const uint64_t mask = ~ invMask;
-	const uint64_t zeroed = bits_ & mask;
+	int64 bits_ = static_cast<int64>(bits);
+	int64 invMask = (1ull << nBits) - 1;
+	int64 mask = ~ invMask;
+	int64 zeroed = bits_ & mask;
 	return static_cast<int64>(zeroed);
 }
 

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

Summary of changes:
 include/geos/constants.h     | 1 -
 src/precision/CommonBits.cpp | 8 ++++----
 2 files changed, 4 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list