From 56875088d4eac8aced2806695411e06430f64964 Mon Sep 17 00:00:00 2001 From: Ben Judd Date: Sun, 18 Apr 2021 16:06:05 -0700 Subject: [PATCH] comments --- src/hash.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/hash.cc b/src/hash.cc index 058985b3..ee3108c7 100644 --- a/src/hash.cc +++ b/src/hash.cc @@ -55,10 +55,8 @@ size_t hash_data(const char* input, size_t len) uint32_t key = 0; switch (len & 0b11) { - case 3: key ^= tail[2] << 16; - [[fallthrough]]; - case 2: key ^= tail[1] << 8; - [[fallthrough]]; + case 3: key ^= tail[2] << 16; [[fallthrough]]; + case 2: key ^= tail[1] << 8; [[fallthrough]]; case 1: key ^= tail[0]; key *= c1; key = rotl(key,15); @@ -72,7 +70,7 @@ size_t hash_data(const char* input, size_t len) return hash; } -UnitTest test_murmer_hash{[] { +UnitTest test_murmur_hash{[] { { constexpr char data[] = "Hello, World!"; kak_assert(hash_data(data, strlen(data)) == 0xf816f95b);