aboutsummaryrefslogtreecommitdiff
path: root/src/leveldb/util/hash.cc
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2014-10-16 12:23:50 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2014-10-16 12:23:50 -0700
commit5b9f8425a515739e2149bf5bfb2ae6ed60bfbaf2 (patch)
treebacc7dd4d2f77da27499000d6f12655a3f6463f3 /src/leveldb/util/hash.cc
parente8f6d54f1f58d9a5998e37367b84b427e51e1ad7 (diff)
parent4b0e2d75d78036e7e76fd9584e17b0379ba08d24 (diff)
Merge src/leveldb changes for LevelDB 1.18.
Diffstat (limited to 'src/leveldb/util/hash.cc')
-rw-r--r--src/leveldb/util/hash.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/leveldb/util/hash.cc b/src/leveldb/util/hash.cc
index 07cf022060..ed439ce7a2 100644
--- a/src/leveldb/util/hash.cc
+++ b/src/leveldb/util/hash.cc
@@ -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;