aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/core/src/firebase/firestore/util/bits.h
diff options
context:
space:
mode:
authorGravatar Gil <mcg@google.com>2018-07-11 15:27:50 -0700
committerGravatar GitHub <noreply@github.com>2018-07-11 15:27:50 -0700
commite1ace703fbf4458d9e887ebf30050b1a0482a2d2 (patch)
tree63537e388b8d16a5625eedce0937cb50bf69d4c7 /Firestore/core/src/firebase/firestore/util/bits.h
parent79f663d5eaaa4b7f9fe46d176c82660d38e4be8a (diff)
Fix Firestore source errors under VS2017 (#1515)
* Project file updates from sync_project.rb * Fix misc compile errors under VS2017 * Fix util/hashing under VS2017 std::hash<int> is not just a pass through in Microsoft's STL. * Disable unsafe code warnings in VS2017 ... where comparing against a reference implementation that has no easy safe equivalent. * Handle drive letters in paths on Windows
Diffstat (limited to 'Firestore/core/src/firebase/firestore/util/bits.h')
-rw-r--r--Firestore/core/src/firebase/firestore/util/bits.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/Firestore/core/src/firebase/firestore/util/bits.h b/Firestore/core/src/firebase/firestore/util/bits.h
index 94a018f..591c306 100644
--- a/Firestore/core/src/firebase/firestore/util/bits.h
+++ b/Firestore/core/src/firebase/firestore/util/bits.h
@@ -24,13 +24,13 @@
#include <cstdint>
-class Bits_Port32_Test;
-class Bits_Port64_Test;
-
namespace firebase {
namespace firestore {
namespace util {
+class Bits_Port32_Test;
+class Bits_Port64_Test;
+
class Bits {
public:
/** Return floor(log2(n)) for positive integer n. Returns -1 iff n == 0. */
@@ -81,9 +81,9 @@ inline int Bits::Log2FloorNonZero64(uint64_t n) {
return 63 ^ __builtin_clzll(n);
}
-#elif defined(COMPILER_MSVC)
+#elif defined(_MSC_VER)
-inline int Bits::Log2FloorNonZero(uint32 n) {
+inline int Bits::Log2FloorNonZero(uint32_t n) {
#ifdef _M_IX86
_asm {
bsr ebx, n
@@ -95,7 +95,7 @@ inline int Bits::Log2FloorNonZero(uint32 n) {
#endif
}
-inline int Bits::Log2Floor(uint32 n) {
+inline int Bits::Log2Floor(uint32_t n) {
#ifdef _M_IX86
_asm {
xor ebx, ebx
@@ -120,7 +120,7 @@ inline int Bits::Log2FloorNonZero64(uint64_t n) {
return Bits::Log2FloorNonZero64_Portable(n);
}
-#else // !__GNUC__ && !COMPILER_MSVC
+#else // !__GNUC__ && !_MSC_VER
inline int Bits::Log2Floor64(uint64_t n) {
return Bits::Log2Floor64_Portable(n);