diff --git a/include/gaia/external/robin_hood.h b/include/gaia/external/robin_hood.h index c5592f57..1988f05a 100644 --- a/include/gaia/external/robin_hood.h +++ b/include/gaia/external/robin_hood.h @@ -933,7 +933,7 @@ namespace robin_hood { 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 = 64U - InitialInfoNumBits; using DataPool = detail::NodeAllocator; // type needs to be wider than uint8_t. @@ -1331,8 +1331,8 @@ namespace robin_hood { 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