From d63f79325f85e014361eb8cf1e41eaebedb1ae71 Mon Sep 17 00:00:00 2001 From: void_17 Date: Mon, 2 Mar 2026 15:53:32 +0700 Subject: 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 --- Minecraft.World/ChunkPos.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Minecraft.World/ChunkPos.cpp') 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(x) + L", " + _toString(z) + L"]"; } -__int64 ChunkPos::hash_fnct(const ChunkPos &k) +int64_t ChunkPos::hash_fnct(const ChunkPos &k) { return k.hashCode(k.x,k.z); } -- cgit v1.2.3