diff options
| author | qwasdrizzel <145519042+qwasdrizzel@users.noreply.github.com> | 2026-03-16 21:44:26 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-16 21:44:26 -0500 |
| commit | ce739f6045ec72127491286ea3f3f21e537c1b55 (patch) | |
| tree | f33bd42a47c1b4a7b2153a7fb77127ee3b407db9 /Minecraft.World/ChunkPos.cpp | |
| parent | 255a18fe8e9b57377975f82e2b227afe2a12eda0 (diff) | |
| parent | 5a59f5d146b43811dde6a5a0245ee9875d7b5cd1 (diff) | |
Merge branch 'smartcmd:main' into main
Diffstat (limited to 'Minecraft.World/ChunkPos.cpp')
| -rw-r--r-- | Minecraft.World/ChunkPos.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Minecraft.World/ChunkPos.cpp b/Minecraft.World/ChunkPos.cpp index ff1c34f0..6d37a446 100644 --- a/Minecraft.World/ChunkPos.cpp +++ b/Minecraft.World/ChunkPos.cpp @@ -6,18 +6,18 @@ ChunkPos::ChunkPos(int x, int z) : x( x ), z( z ) { } -__int64 ChunkPos::hashCode(int x, int z) +int64_t ChunkPos::hashCode(int x, int z) { - __int64 xx = x; - __int64 zz = z; + int64_t xx = x; + int64_t zz = z; return (xx & 0xffffffffl) | ((zz & 0xffffffffl) << 32l); } int ChunkPos::hashCode() { - __int64 hash = hashCode(x, z); - int h1 = (int) (hash); - int h2 = (int) (hash >> 32l); + int64_t hash = hashCode(x, z); + const int h1 = static_cast<int>(hash); + const int h2 = static_cast<int>(hash >> 32l); return h1 ^ h2; } @@ -63,7 +63,7 @@ wstring ChunkPos::toString() return L"[" + std::to_wstring(x) + L", " + std::to_wstring(z) + L"]"; } -__int64 ChunkPos::hash_fnct(const ChunkPos &k) +int64_t ChunkPos::hash_fnct(const ChunkPos &k) { return k.hashCode(k.x,k.z); } |
