diff --git a/src/include/robin_hood.h b/src/include/robin_hood.h index 0af031f..5b4b651 100644 --- a/src/include/robin_hood.h +++ b/src/include/robin_hood.h @@ -945,7 +945,7 @@ class Table static constexpr uint32_t InitialInfoNumBits = 5; static constexpr uint8_t InitialInfoInc = 1U << InitialInfoNumBits; static constexpr size_t InfoMask = InitialInfoInc - 1U; - static constexpr uint8_t InitialInfoHashShift = 0; + static constexpr uint8_t InitialInfoHashShift = 64 - InitialInfoNumBits; using DataPool = detail::NodeAllocator; // type needs to be wider than uint8_t. @@ -1355,8 +1355,8 @@ class Table h ^= h >> 33U; // the lower InitialInfoNumBits are reserved for info. - *info = mInfoInc + static_cast((h & InfoMask) >> mInfoHashShift); - *idx = (static_cast(h) >> InitialInfoNumBits) & mMask; + *info = mInfoInc + static_cast(h >> mInfoHashShift); + *idx = static_cast(h) & mMask; } // forwards the index by one, wrapping around at the end