diff options
Diffstat (limited to 'src/world.cpp')
-rw-r--r-- | src/world.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/world.cpp b/src/world.cpp index 54096608..5a6e505f 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -17,7 +17,10 @@ size_t std::hash<chunk_coords_>::operator()(const chunk_coords_& coord) const no else x ^= size_t(uint8_t(coord.z-chunk_min_z) & 0xf) * size_t(1664525); - return int_hash(x); + if constexpr(sizeof(size_t) > 4) + return int_hash(uint64_t(x)); + else + return int_hash(uint32_t(x)); } namespace floormat { |