diff options
| author | void_17 <heroerror3@gmail.com> | 2026-03-02 15:53:32 +0700 |
|---|---|---|
| committer | void_17 <heroerror3@gmail.com> | 2026-03-02 15:53:32 +0700 |
| commit | d63f79325f85e014361eb8cf1e41eaebedb1ae71 (patch) | |
| tree | d9f28714afd516bc2450f33b0a77c5e05ff4de90 /Minecraft.World/ChunkPos.cpp | |
| parent | d6ec138710461294c3ffd2723bc8a9f212d3471f (diff) | |
Get rid of MSVC's __int64
Use either int64_t, uint64_t or long long and unsigned long long, defined as per C++11 standard
Diffstat (limited to 'Minecraft.World/ChunkPos.cpp')
| -rw-r--r-- | Minecraft.World/ChunkPos.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Minecraft.World/ChunkPos.cpp b/Minecraft.World/ChunkPos.cpp index 3f9674a7..1bdf165d 100644 --- a/Minecraft.World/ChunkPos.cpp +++ b/Minecraft.World/ChunkPos.cpp @@ -6,16 +6,16 @@ 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); + int64_t hash = hashCode(x, z); int h1 = (int) (hash); int h2 = (int) (hash >> 32l); return h1 ^ h2; @@ -53,7 +53,7 @@ int ChunkPos::getMiddleBlockZ() return ( z << 4 ) + 8; } -TilePos ChunkPos::getMiddleBlockPosition(int y) +TilePos ChunkPos::getMiddleBlockPosition(int y) { return TilePos(getMiddleBlockX(), y, getMiddleBlockZ()); } @@ -63,7 +63,7 @@ wstring ChunkPos::toString() return L"[" + _toString<int>(x) + L", " + _toString<int>(z) + L"]"; } -__int64 ChunkPos::hash_fnct(const ChunkPos &k) +int64_t ChunkPos::hash_fnct(const ChunkPos &k) { return k.hashCode(k.x,k.z); } |
