summaryrefslogtreecommitdiff
path: root/src/database.cpp
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2014-11-16 15:31:57 -0500
committerShadowNinja <shadowninja@minetest.net>2015-03-06 00:20:45 -0500
commit708337dfc2b3871dc6de983e781e4a4a60a1881d (patch)
tree97352d676d9d76b036d8b559ae4d3c6fe83bbf12 /src/database.cpp
parentc7454d4732dee0f7364ccb8e07002df1a037b94d (diff)
downloadminetest-708337dfc2b3871dc6de983e781e4a4a60a1881d.tar.gz
minetest-708337dfc2b3871dc6de983e781e4a4a60a1881d.tar.bz2
minetest-708337dfc2b3871dc6de983e781e4a4a60a1881d.zip
Clean up database API and save the local map on an interval
Diffstat (limited to 'src/database.cpp')
-rw-r--r--src/database.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/database.cpp b/src/database.cpp
index 26f6992fc..262d475ec 100644
--- a/src/database.cpp
+++ b/src/database.cpp
@@ -48,7 +48,7 @@ static inline s64 pythonmodulo(s64 i, s16 mod)
}
-s64 Database::getBlockAsInteger(const v3s16 pos) const
+s64 Database::getBlockAsInteger(const v3s16 &pos)
{
return (u64) pos.Z * 0x1000000 +
(u64) pos.Y * 0x1000 +
@@ -56,7 +56,7 @@ s64 Database::getBlockAsInteger(const v3s16 pos) const
}
-v3s16 Database::getIntegerAsBlock(s64 i) const
+v3s16 Database::getIntegerAsBlock(s64 i)
{
v3s16 pos;
pos.X = unsigned_to_signed(pythonmodulo(i, 4096), 2048);