X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2FHash.h;h=e04cf8cf48768a1e474de15d904642b5a3e0efa1;hb=2f5c6c3e446d6b98398dc5aeaf0e13ec888e1726;hp=1a16f3c8e1a11d14ed7d6bf6298495c86b168895;hpb=6fc7a48c7e3a5cdb0c97196b2ff0f08c6ee073d7;p=folly.git diff --git a/folly/Hash.h b/folly/Hash.h index 1a16f3c8..e04cf8cf 100644 --- a/folly/Hash.h +++ b/folly/Hash.h @@ -42,12 +42,12 @@ namespace folly { namespace hash { // This is the Hash128to64 function from Google's cityhash (available // under the MIT License). We use it to reduce multiple 64 bit hashes // into a single hash. -inline size_t hash_128_to_64(const size_t upper, const size_t lower) { +inline uint64_t hash_128_to_64(const uint64_t upper, const uint64_t lower) { // Murmur-inspired hashing. - const size_t kMul = 0x9ddfea08eb382d69ULL; - size_t a = (lower ^ upper) * kMul; + const uint64_t kMul = 0x9ddfea08eb382d69ULL; + uint64_t a = (lower ^ upper) * kMul; a ^= (a >> 47); - size_t b = (upper ^ a) * kMul; + uint64_t b = (upper ^ a) * kMul; b ^= (b >> 47); b *= kMul; return b;