mirror of
https://github.com/boostorg/container_hash.git
synced 2025-08-04 15:04:39 +02:00
Fix /RTCc violations because Unordered tests with it
This commit is contained in:
@@ -104,7 +104,7 @@ std::size_t>::type
|
|||||||
boost::uint32_t const k = 0xe35e67b1U; // q * q
|
boost::uint32_t const k = 0xe35e67b1U; // q * q
|
||||||
|
|
||||||
boost::uint64_t h = mul32( static_cast<boost::uint32_t>( seed ) + q, k );
|
boost::uint64_t h = mul32( static_cast<boost::uint32_t>( seed ) + q, k );
|
||||||
boost::uint32_t w = static_cast<boost::uint32_t>( h );
|
boost::uint32_t w = static_cast<boost::uint32_t>( h & 0xFFFFFFFF );
|
||||||
|
|
||||||
h ^= n;
|
h ^= n;
|
||||||
|
|
||||||
@@ -138,9 +138,9 @@ std::size_t>::type
|
|||||||
}
|
}
|
||||||
|
|
||||||
w += q;
|
w += q;
|
||||||
h ^= mul32( static_cast<boost::uint32_t>( h ) + w, static_cast<boost::uint32_t>( h >> 32 ) + w + k );
|
h ^= mul32( static_cast<boost::uint32_t>( h & 0xFFFFFFFF ) + w, static_cast<boost::uint32_t>( h >> 32 ) + w + k );
|
||||||
|
|
||||||
return static_cast<boost::uint32_t>( h ) ^ static_cast<boost::uint32_t>( h >> 32 );
|
return static_cast<boost::uint32_t>( h & 0xFFFFFFFF ) ^ static_cast<boost::uint32_t>( h >> 32 );
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class It>
|
template<class It>
|
||||||
@@ -157,7 +157,7 @@ std::size_t>::type
|
|||||||
boost::uint32_t const k = 0xe35e67b1U; // q * q
|
boost::uint32_t const k = 0xe35e67b1U; // q * q
|
||||||
|
|
||||||
boost::uint64_t h = mul32( static_cast<boost::uint32_t>( seed ) + q, k );
|
boost::uint64_t h = mul32( static_cast<boost::uint32_t>( seed ) + q, k );
|
||||||
boost::uint32_t w = static_cast<boost::uint32_t>( h );
|
boost::uint32_t w = static_cast<boost::uint32_t>( h & 0xFFFFFFFF );
|
||||||
|
|
||||||
boost::uint32_t v1 = 0;
|
boost::uint32_t v1 = 0;
|
||||||
|
|
||||||
@@ -211,9 +211,9 @@ std::size_t>::type
|
|||||||
h ^= mul32( v1 + w, k );
|
h ^= mul32( v1 + w, k );
|
||||||
|
|
||||||
w += q;
|
w += q;
|
||||||
h ^= mul32( static_cast<boost::uint32_t>( h ) + w, static_cast<boost::uint32_t>( h >> 32 ) + w + k );
|
h ^= mul32( static_cast<boost::uint32_t>( h & 0xFFFFFFFF ) + w, static_cast<boost::uint32_t>( h >> 32 ) + w + k );
|
||||||
|
|
||||||
return static_cast<boost::uint32_t>( h ) ^ static_cast<boost::uint32_t>( h >> 32 );
|
return static_cast<boost::uint32_t>( h & 0xFFFFFFFF ) ^ static_cast<boost::uint32_t>( h >> 32 );
|
||||||
}
|
}
|
||||||
|
|
||||||
// specialized char[] version, 64 bit
|
// specialized char[] version, 64 bit
|
||||||
|
@@ -118,7 +118,7 @@ namespace boost
|
|||||||
std::size_t seed = 0;
|
std::size_t seed = 0;
|
||||||
|
|
||||||
seed = static_cast<std::size_t>( v >> 32 ) + hash_detail::hash_mix( seed );
|
seed = static_cast<std::size_t>( v >> 32 ) + hash_detail::hash_mix( seed );
|
||||||
seed = static_cast<std::size_t>( v ) + hash_detail::hash_mix( seed );
|
seed = static_cast<std::size_t>( v & 0xFFFFFFFF ) + hash_detail::hash_mix( seed );
|
||||||
|
|
||||||
return seed;
|
return seed;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user