File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -933,7 +933,7 @@ namespace robin_hood {
933
933
static constexpr uint32_t InitialInfoNumBits = 5 ;
934
934
static constexpr uint8_t InitialInfoInc = 1U << InitialInfoNumBits;
935
935
static constexpr size_t InfoMask = InitialInfoInc - 1U ;
936
- static constexpr uint8_t InitialInfoHashShift = 0 ;
936
+ static constexpr uint8_t InitialInfoHashShift = 64U - InitialInfoNumBits ;
937
937
using DataPool = detail::NodeAllocator<value_type, 4 , 16384 , IsFlat>;
938
938
939
939
// type needs to be wider than uint8_t.
@@ -1331,8 +1331,8 @@ namespace robin_hood {
1331
1331
h ^= h >> 33U ;
1332
1332
1333
1333
// the lower InitialInfoNumBits are reserved for info.
1334
- *info = mInfoInc + static_cast <InfoType>((h & InfoMask) >> mInfoHashShift );
1335
- *idx = (static_cast <size_t >(h) >> InitialInfoNumBits ) & mMask ;
1334
+ *info = mInfoInc + static_cast <InfoType>(h >> mInfoHashShift );
1335
+ *idx = (static_cast <size_t >(h)) & mMask ;
1336
1336
}
1337
1337
1338
1338
// forwards the index by one, wrapping around at the end
You can’t perform that action at this time.
0 commit comments