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

@@ -85,7 +85,7 @@ BiomeCache::Block *BiomeCache::getBlockAt(int x, int z)
EnterCriticalSection(&m_CS);
x >>= ZONE_SIZE_BITS;
z >>= ZONE_SIZE_BITS;
__int64 slot = (((__int64) x) & 0xffffffffl) | ((((__int64) z) & 0xffffffffl) << 32l);
int64_t slot = (((int64_t) x) & 0xffffffffl) | ((((int64_t) z) & 0xffffffffl) << 32l);
AUTO_VAR(it, cached.find(slot));
Block *block = NULL;
if (it == cached.end())
@@ -124,8 +124,8 @@ float BiomeCache::getDownfall(int x, int z)
void BiomeCache::update()
{
EnterCriticalSection(&m_CS);
__int64 now = app.getAppTime();
__int64 utime = now - lastUpdateTime;
int64_t now = app.getAppTime();
int64_t utime = now - lastUpdateTime;
if (utime > DECAY_TIME / 4 || utime < 0)
{
lastUpdateTime = now;
@@ -133,11 +133,11 @@ void BiomeCache::update()
for (AUTO_VAR(it, all.begin()); it != all.end();)
{
Block *block = *it;
__int64 time = now - block->lastUse;
int64_t time = now - block->lastUse;
if (time > DECAY_TIME || time < 0)
{
it = all.erase(it);
__int64 slot = (((__int64) block->x) & 0xffffffffl) | ((((__int64) block->z) & 0xffffffffl) << 32l);
int64_t slot = (((int64_t) block->x) & 0xffffffffl) | ((((int64_t) block->z) & 0xffffffffl) << 32l);
cached.erase(slot);
delete block;
}