Merge src/leveldb changes for LevelDB 1.18.

This commit is contained in:
Pieter Wuille
2014-10-16 12:23:50 -07:00
40 changed files with 602 additions and 282 deletions

View File

@@ -34,13 +34,13 @@ uint32_t Hash(const char* data, size_t n, uint32_t seed) {
// Pick up remaining bytes
switch (limit - data) {
case 3:
h += data[2] << 16;
h += static_cast<unsigned char>(data[2]) << 16;
FALLTHROUGH_INTENDED;
case 2:
h += data[1] << 8;
h += static_cast<unsigned char>(data[1]) << 8;
FALLTHROUGH_INTENDED;
case 1:
h += data[0];
h += static_cast<unsigned char>(data[0]);
h *= m;
h ^= (h >> r);
break;