Make DestructorCheck::Safety no-copy, no-move
[folly.git] / folly / SpookyHashV2.cpp
index cd251870efd20f983ec351f4939b2f6cf5610de6..0f623625a603f0364c2f82074e1c7f66cec72f18 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -28,6 +28,7 @@
 
 #include <folly/SpookyHashV2.h>
 
+#include <folly/CppAttributes.h>
 #include <folly/Portability.h>
 
 #include <cstring>
@@ -98,37 +99,48 @@ void SpookyHashV2::Short(
     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;
+        FOLLY_FALLTHROUGH;
     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;
+        FOLLY_FALLTHROUGH;
     case 10:
         d += ((uint64_t)u.p8[9]) << 8;
+        FOLLY_FALLTHROUGH;
     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;
+        FOLLY_FALLTHROUGH;
     case 6:
         c += ((uint64_t)u.p8[5]) << 40;
+        FOLLY_FALLTHROUGH;
     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;
+        FOLLY_FALLTHROUGH;
     case 2:
         c += ((uint64_t)u.p8[1]) << 8;
+        FOLLY_FALLTHROUGH;
     case 1:
         c += (uint64_t)u.p8[0];
         break;