Commit 2c2af002 authored by Yang Guo's avatar Yang Guo Committed by Commit Bot

Use 64-bit for seeded integer hashes

R=petermarshall@chromium.org

Bug: chromium:680662
Change-Id: If48d1043dbe1e1bb695ec890c23e103a6cacf2d4
Reviewed-on: https://chromium-review.googlesource.com/1244220
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56271}
parent 48d02e69
......@@ -508,11 +508,11 @@ inline uint32_t ComputeLongHash(uint64_t key) {
hash = hash ^ (hash >> 11);
hash = hash + (hash << 6);
hash = hash ^ (hash >> 22);
return static_cast<uint32_t>(hash);
return static_cast<uint32_t>(hash & 0x3fffffff);
}
inline uint32_t ComputeSeededHash(uint32_t key, uint64_t seed) {
return ComputeUnseededHash(key ^ static_cast<uint32_t>(seed));
return ComputeLongHash(static_cast<uint64_t>(key) ^ seed);
}
inline uint32_t ComputePointerHash(void* ptr) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment