Skip to content

Commit

Permalink
More switch fall throughs
Browse files Browse the repository at this point in the history
  • Loading branch information
Myckel Habets committed Jul 8, 2018
1 parent 03432cd commit 148ed09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/hash.cpp
Expand Up @@ -40,7 +40,9 @@ unsigned int MurmurHash3(unsigned int nHashSeed, const std::vector<unsigned char
switch(vDataToHash.size() & 3)
{
case 3: k1 ^= tail[2] << 16;
// fall through
case 2: k1 ^= tail[1] << 8;
// fall through
case 1: k1 ^= tail[0];
k1 *= c1; k1 = ROTL32(k1,15); k1 *= c2; h1 ^= k1;
};
Expand Down
2 changes: 2 additions & 0 deletions src/leveldb/util/hash.cc
Expand Up @@ -36,9 +36,11 @@ uint32_t Hash(const char* data, size_t n, uint32_t seed) {
case 3:
h += data[2] << 16;
FALLTHROUGH_INTENDED;
// fall through
case 2:
h += data[1] << 8;
FALLTHROUGH_INTENDED;
// fall through
case 1:
h += data[0];
h *= m;
Expand Down

0 comments on commit 148ed09

Please sign in to comment.