summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-04-10 11:21:23 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-04-10 11:36:01 +0200
commitfb5dca7ee80621fe17e9ab542a7c4fe521ba4193 (patch)
treee31df70eb69411aac6d119e10e837477a7f0d9a2
parenteae196aa00d2760598ed700dd66b9c4a604c1d9a (diff)
fix ci
-rw-r--r--src/world.cpp5
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 {