Fix build.

This commit is contained in:
David Anderson
2013-08-25 14:04:01 -07:00
parent 0f52f6931b
commit 2c1a398292
4 changed files with 11 additions and 19 deletions
+4 -4
View File
@@ -568,12 +568,12 @@ static inline uint32_t
HashInt64(int64_t key)
{
key = (~key) + (key << 18); // key = (key << 18) - key - 1;
key = key ^ (uint64(key) >> 31);
key = key ^ (uint64_t(key) >> 31);
key = key * 21; // key = (key + (key << 2)) + (key << 4);
key = key ^ (uint64(key) >> 11);
key = key ^ (uint64_t(key) >> 11);
key = key + (key << 6);
key = key ^ (uint64(key) >> 22);
return uint32(key);
key = key ^ (uint64_t(key) >> 22);
return uint32_t(key);
}
template <size_t Size>
+2 -8
View File
@@ -48,18 +48,12 @@ namespace ke {
static const size_t kMallocAlignment = sizeof(void *) * 2;
typedef uint8_t uint8;
typedef int32_t int32;
typedef uint32_t uint32;
typedef int64_t int64;
typedef uint64_t uint64;
typedef uint8 * Address;
static const size_t kKB = 1024;
static const size_t kMB = 1024 * kKB;
static const size_t kGB = 1024 * kMB;
typedef uint8_t * Address;
template <typename T> T
ReturnAndVoid(T &t)
{