const uint32_t m= 0x5bd1e995;\r
const int r= 16;\r
uint32_t h= length * m;\r
+ uint32_t k = 0;\r
\r
while(length >= 4)\r
{\r
- uint32_t k = *(uint32_t*)key;\r
+ k = *(uint32_t*)key;\r
MIX(h,k,m);\r
\r
key += 4;\r
length -= 4;\r
}\r
\r
- if (length)\r
+ switch(length)\r
{\r
- uint32_t k= 0;\r
-\r
- switch(length)\r
- {\r
- case 3: k += key[2] << 16;\r
- case 2: k += key[1] << 8;\r
- case 1: k += key[0];\r
- };\r
- MIX(h,k,m);\r
- }\r
+ case 3: k += key[2] << 16;\r
+ case 2: k += key[1] << 8;\r
+ case 1: k += key[0];\r
+ MIX(h,k,m);\r
+ default:\r
+ };\r
\r
h *= m;\r
h ^= h >> 10;\r