[geos-commits] [SCM] GEOS branch svn-3.6 updated. 2254b48c58e7129a7e28d6dfdaadb4bbb60abe43

git at osgeo.org git at osgeo.org
Wed Sep 18 10:55:42 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, svn-3.6 has been updated
       via  2254b48c58e7129a7e28d6dfdaadb4bbb60abe43 (commit)
      from  1ec3a55168d52997d57469bd6be683cfa69cd375 (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 2254b48c58e7129a7e28d6dfdaadb4bbb60abe43
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Wed Sep 18 10:55:26 2019 -0700

    Strip out c++11 type expectations

diff --git a/src/precision/CommonBits.cpp b/src/precision/CommonBits.cpp
index 763b33b..d209a07 100644
--- a/src/precision/CommonBits.cpp
+++ b/src/precision/CommonBits.cpp
@@ -43,13 +43,13 @@ CommonBits::numCommonMostSigMantissaBits(int64 num1, int64 num2)
 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;
-	return static_cast<int64>(zeroed);
+	if (nBits >= 64 || nBits < 0) return 0;
+	int64 invMask = ((int64)1 << nBits) - 1;
+	int64 mask = ~ invMask;
+	int64 zeroed = bits & mask;
+	return zeroed;
 }
+
 /*static public*/
 int
 CommonBits::getBit(int64 bits, int i)

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

Summary of changes:
 src/precision/CommonBits.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list