1
0
Fork 0

Common: Fix 2 implicit conversion warnings in CityHash

This commit is contained in:
Yuri Kunde Schlesner 2018-01-15 01:46:50 -08:00
parent 712e6ee960
commit 3e456cd3fe
1 changed files with 2 additions and 2 deletions

View File

@ -179,7 +179,7 @@ static uint64 HashLen0to16(const char* s, size_t len) {
uint8 b = s[len >> 1];
uint8 c = s[len - 1];
uint32 y = static_cast<uint32>(a) + (static_cast<uint32>(b) << 8);
uint32 z = len + (static_cast<uint32>(c) << 2);
uint32 z = static_cast<uint32>(len) + (static_cast<uint32>(c) << 2);
return ShiftMix(y * k2 ^ z * k0) * k2;
}
return k2;
@ -290,7 +290,7 @@ static uint128 CityMurmur(const char* s, size_t len, uint128 seed) {
uint64 b = Uint128High64(seed);
uint64 c = 0;
uint64 d = 0;
signed long l = len - 16;
signed long l = static_cast<long>(len) - 16;
if (l <= 0) { // len <= 16
a = ShiftMix(a * k1) * k1;
c = b * k1 + HashLen0to16(s, len);