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
This commit is contained in:
void_17
2026-03-02 15:53:32 +07:00
parent d6ec138710
commit d63f79325f
308 changed files with 5371 additions and 5379 deletions

View File

@@ -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);
}