mirror of
https://github.com/boostorg/container_hash.git
synced 2025-08-02 05:54:37 +02:00
Hardcode q*q to avoid 'integral constant overflow' warnings
This commit is contained in:
@@ -257,7 +257,7 @@ std::size_t>::type
|
||||
std::size_t n = static_cast<std::size_t>( last - first );
|
||||
|
||||
boost::uint64_t const q = 0x9e3779b97f4a7c15ULL;
|
||||
boost::uint64_t const k = q * q;
|
||||
boost::uint64_t const k = 0xdf442d22ce4859b9ULL; // q * q
|
||||
|
||||
boost::uint64_t w = mulx( seed + q, k );
|
||||
boost::uint64_t h = w ^ n;
|
||||
@@ -309,7 +309,7 @@ std::size_t>::type
|
||||
std::size_t n = 0;
|
||||
|
||||
boost::uint64_t const q = 0x9e3779b97f4a7c15ULL;
|
||||
boost::uint64_t const k = q * q;
|
||||
boost::uint64_t const k = 0xdf442d22ce4859b9ULL; // q * q
|
||||
|
||||
boost::uint64_t w = mulx( seed + q, k );
|
||||
boost::uint64_t h = w;
|
||||
|
Reference in New Issue
Block a user