зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset fbbb42a15738 (bug 1585356) for bustage on city.cpp. CLOSED TREE
This commit is contained in:
Родитель
dfde69a462
Коммит
d9fa427ca2
|
@ -29,7 +29,3 @@
|
|||
#else
|
||||
#define CITYHASH_API __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
#ifndef ssize_t
|
||||
typedef int ssize_t;
|
||||
#endif
|
||||
|
|
|
@ -217,13 +217,13 @@ uint64 CityHash64WithSeeds(const char *s, size_t len,
|
|||
}
|
||||
|
||||
// A subroutine for CityHash128(). Returns a decent 128-bit hash for strings
|
||||
// of any length representable in ssize_t. Based on City and Murmur.
|
||||
// of any length representable in an int. Based on City and Murmur.
|
||||
static uint128 CityMurmur(const char *s, size_t len, uint128 seed) {
|
||||
uint64 a = Uint128Low64(seed);
|
||||
uint64 b = Uint128High64(seed);
|
||||
uint64 c = 0;
|
||||
uint64 d = 0;
|
||||
ssize_t l = len - 16;
|
||||
int l = len - 16;
|
||||
if (l <= 0) { // len <= 16
|
||||
c = b * k1 + HashLen0to16(s, len);
|
||||
d = Rotate(a + (len >= 8 ? UNALIGNED_LOAD64(s) : c), 32);
|
||||
|
|
Загрузка…
Ссылка в новой задаче