From b148e34818edfe96f2d44d2c59c7c8da9fe3e731 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 17 Sep 2022 02:34:14 +0300 Subject: [PATCH] Fix 64 bit hash_mix multiplier --- include/boost/container_hash/detail/hash_mix.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/container_hash/detail/hash_mix.hpp b/include/boost/container_hash/detail/hash_mix.hpp index 6556c15..327da9e 100644 --- a/include/boost/container_hash/detail/hash_mix.hpp +++ b/include/boost/container_hash/detail/hash_mix.hpp @@ -52,7 +52,7 @@ template struct hash_mix_impl; // x *= 0xe9846af9b1a615d; // x ^= x >> 32; // x *= 0xe9846af9b1a615d; -// x ^= x >> 28; +// x ^= x >> 28; // // An equally good alternative is Pelle Evensen's Moremur: // @@ -68,7 +68,7 @@ template<> struct hash_mix_impl<64> { inline static boost::uint64_t fn( boost::uint64_t x ) { - boost::uint64_t const m = (boost::uint64_t(0xe9846af9) << 32) + 0xb1a615d; + boost::uint64_t const m = (boost::uint64_t(0xe9846af) << 32) + 0x9b1a615d; x ^= x >> 32; x *= m;