projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refer to nullptr not NULL
[folly.git]
/
folly
/
SpookyHashV1.cpp
diff --git
a/folly/SpookyHashV1.cpp
b/folly/SpookyHashV1.cpp
index cdd09193a603853daf293b99dc06eca3ca22fbdf..401da9f81a2117bad7e5870533af1d143bfcfdfa 100644
(file)
--- a/
folly/SpookyHashV1.cpp
+++ b/
folly/SpookyHashV1.cpp
@@
-26,6
+26,8
@@
#include <folly/SpookyHashV1.h>
#include <folly/SpookyHashV1.h>
+#include <folly/CppAttributes.h>
+
#include <cstring>
#define ALLOW_UNALIGNED_READS 1
#include <cstring>
#define ALLOW_UNALIGNED_READS 1
@@
-96,37
+98,48
@@
void SpookyHashV1::Short(
switch (remainder)
{
case 15:
switch (remainder)
{
case 15:
- d += ((uint64_t)u.p8[14]) << 48;
+ d += ((uint64_t)u.p8[14]) << 48;
+ FOLLY_FALLTHROUGH;
case 14:
d += ((uint64_t)u.p8[13]) << 40;
case 14:
d += ((uint64_t)u.p8[13]) << 40;
+ FOLLY_FALLTHROUGH;
case 13:
d += ((uint64_t)u.p8[12]) << 32;
case 13:
d += ((uint64_t)u.p8[12]) << 32;
+ FOLLY_FALLTHROUGH;
case 12:
d += u.p32[2];
c += u.p64[0];
break;
case 11:
d += ((uint64_t)u.p8[10]) << 16;
case 12:
d += u.p32[2];
c += u.p64[0];
break;
case 11:
d += ((uint64_t)u.p8[10]) << 16;
+ FOLLY_FALLTHROUGH;
case 10:
d += ((uint64_t)u.p8[9]) << 8;
case 10:
d += ((uint64_t)u.p8[9]) << 8;
+ FOLLY_FALLTHROUGH;
case 9:
d += (uint64_t)u.p8[8];
case 9:
d += (uint64_t)u.p8[8];
+ FOLLY_FALLTHROUGH;
case 8:
c += u.p64[0];
break;
case 7:
c += ((uint64_t)u.p8[6]) << 48;
case 8:
c += u.p64[0];
break;
case 7:
c += ((uint64_t)u.p8[6]) << 48;
+ FOLLY_FALLTHROUGH;
case 6:
c += ((uint64_t)u.p8[5]) << 40;
case 6:
c += ((uint64_t)u.p8[5]) << 40;
+ FOLLY_FALLTHROUGH;
case 5:
c += ((uint64_t)u.p8[4]) << 32;
case 5:
c += ((uint64_t)u.p8[4]) << 32;
+ FOLLY_FALLTHROUGH;
case 4:
c += u.p32[0];
break;
case 3:
c += ((uint64_t)u.p8[2]) << 16;
case 4:
c += u.p32[0];
break;
case 3:
c += ((uint64_t)u.p8[2]) << 16;
+ FOLLY_FALLTHROUGH;
case 2:
c += ((uint64_t)u.p8[1]) << 8;
case 2:
c += ((uint64_t)u.p8[1]) << 8;
+ FOLLY_FALLTHROUGH;
case 1:
c += (uint64_t)u.p8[0];
break;
case 1:
c += (uint64_t)u.p8[0];
break;