From 18577f25277f269c8dd8d2bdcaaccbac72d9370d Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Wed, 12 Mar 2014 19:37:19 -0400 Subject: Replace usage of long long with u64/s64 --- src/database.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/database.cpp') diff --git a/src/database.cpp b/src/database.cpp index b793cd2f2..e3d92f915 100644 --- a/src/database.cpp +++ b/src/database.cpp @@ -36,13 +36,13 @@ static s64 pythonmodulo(s64 i, s64 mod) return mod - ((-i) % mod); } -long long Database::getBlockAsInteger(const v3s16 pos) { - return (unsigned long long)pos.Z*16777216 + - (unsigned long long)pos.Y*4096 + - (unsigned long long)pos.X; +s64 Database::getBlockAsInteger(const v3s16 pos) { + return (u64) pos.Z * 16777216 + + (u64) pos.Y * 4096 + + (u64) pos.X; } -v3s16 Database::getIntegerAsBlock(long long i) { +v3s16 Database::getIntegerAsBlock(s64 i) { s32 x = unsignedToSigned(pythonmodulo(i, 4096), 2048); i = (i - x) / 4096; s32 y = unsignedToSigned(pythonmodulo(i, 4096), 2048); -- cgit v1.2.3