We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 36ece56 commit d672a74Copy full SHA for d672a74
1 file changed
src/filter/golomb.cpp
@@ -56,8 +56,9 @@ static uint64_t decode(bitreader& source, uint8_t modulo_exponent) NOEXCEPT
56
inline uint64_t hash_to_range(const data_slice& item, uint64_t bound,
57
const siphash_key& key) NOEXCEPT
58
{
59
+ constexpr auto shift = bits<uint64_t>;
60
const auto product = uint128_t(siphash(key, item)) * uint128_t(bound);
- return (product >> bits<uint64_t>).convert_to<uint64_t>();
61
+ return (product >> shift).convert_to<uint64_t>();
62
}
63
64
static std::vector<uint64_t> hashed_set_construct(const data_stack& items,
0 commit comments