aboutsummaryrefslogtreecommitdiff
path: root/src/database.cpp
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2014-03-12 19:37:19 -0400
committerShadowNinja <shadowninja@minetest.net>2014-03-12 19:37:19 -0400
commit18577f25277f269c8dd8d2bdcaaccbac72d9370d (patch)
tree094926c06f9c5943433f846a8257699c59a19b50 /src/database.cpp
parent7cac34c807b6f38eaca3bc8296566493c8874e03 (diff)
downloadminetest-18577f25277f269c8dd8d2bdcaaccbac72d9370d.tar.gz
minetest-18577f25277f269c8dd8d2bdcaaccbac72d9370d.tar.bz2
minetest-18577f25277f269c8dd8d2bdcaaccbac72d9370d.zip
Replace usage of long long with u64/s64
Diffstat (limited to 'src/database.cpp')
-rw-r--r--src/database.cpp10
1 files changed, 5 insertions, 5 deletions
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);