From e1ace703fbf4458d9e887ebf30050b1a0482a2d2 Mon Sep 17 00:00:00 2001 From: Gil Date: Wed, 11 Jul 2018 15:27:50 -0700 Subject: 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 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 --- Firestore/core/src/firebase/firestore/util/bits.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Firestore/core/src/firebase/firestore/util/bits.h') 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 -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); -- cgit v1.2.3