File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ namespace
4949// that fit into an unsigned int, and then shift those bytes out of the
5050// hash. We repeat until we have no bits left in the hash.
5151template <typename SeedType>
52- inline SeedType hashToSeed (size_t hash) {
52+ inline SeedType hashToSeed (uint64_t hash) {
5353 SeedType seed = 0 ;
5454 do {
5555 seed ^= (SeedType) hash;
@@ -955,7 +955,7 @@ inline FunctionGroup::UniquePtr axrand32(const FunctionOptions& op)
955955 // (e.g. -0 and +0 must return the same hash value, etc). Other than these
956956 // special cases, this function will usually just copy the binary
957957 // representation of a float into the resultant `size_t`
958- const size_t hash = std::hash<double >()(seed);
958+ const uint64_t hash = std::hash<double >()(seed);
959959
960960 // Now that we have a reliable hash (with special floating-point cases taken
961961 // care of), we proceed to use this hash to seed a random number generator.
Original file line number Diff line number Diff line change @@ -1166,7 +1166,7 @@ TestStandardFunctions::rand()
11661166void
11671167TestStandardFunctions::rand32 ()
11681168{
1169- auto hashToSeed = [](size_t hash) ->
1169+ auto hashToSeed = [](uint64_t hash) ->
11701170 std::mt19937::result_type
11711171 {
11721172 unsigned int seed = 0 ;
You can’t perform that action at this time.
0 commit comments