Fix the binary 32 and 64 bit hash functions.

This commit is contained in:
Daniel
2016-02-28 09:14:37 +00:00
parent fa6cb80704
commit 45eeb170f2

View File

@@ -212,7 +212,6 @@ namespace boost
seed ^= value + 0x9e3779b9 + (seed<<6) + (seed>>2);
}
template <typename SizeT>
inline void hash_combine_impl(boost::uint32_t& h1,
boost::uint32_t k1)
{
@@ -234,7 +233,6 @@ namespace boost
#if !defined(BOOST_NO_INT64_T) && \
!(defined(__GNUC__) && ULONG_MAX == 0xffffffff)
template <typename SizeT>
inline void hash_combine_impl(boost::uint64_t& h,
boost::uint64_t k)
{
@@ -247,6 +245,10 @@ namespace boost
h ^= k;
h *= m;
// Completely arbitrary number, to prevent 0's
// from hashing to 0.
h += 0xe6546b64;
}
#endif // BOOST_NO_INT64_T