summaryrefslogtreecommitdiff
path: root/src/serialization.h
diff options
context:
space:
mode:
authorCraig Robbins <kde.psych@gmail.com>2014-12-29 23:53:08 +1000
committerCraig Robbins <kde.psych@gmail.com>2014-12-29 23:56:40 +1000
commit3993102e880f2a31b6fef9484b8527a58e850744 (patch)
tree780f07bbcddbf5ec0e2b820d675aff615cab0476 /src/serialization.h
parent5038b9aaeced00396e37f4d6665f8afe21169a8a (diff)
downloadminetest-3993102e880f2a31b6fef9484b8527a58e850744.tar.gz
minetest-3993102e880f2a31b6fef9484b8527a58e850744.tar.bz2
minetest-3993102e880f2a31b6fef9484b8527a58e850744.zip
Fix -Wtype-limits warnings and remove disabling of -Wtype-limits
Diffstat (limited to 'src/serialization.h')
-rw-r--r--src/serialization.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/serialization.h b/src/serialization.h
index 41a505455..caa1a66da 100644
--- a/src/serialization.h
+++ b/src/serialization.h
@@ -72,7 +72,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
// Lowest supported serialization version
#define SER_FMT_VER_LOWEST 0
-#define ser_ver_supported(v) (v >= SER_FMT_VER_LOWEST && v <= SER_FMT_VER_HIGHEST_READ)
+inline bool ser_ver_supported(s32 v) {
+ return v >= SER_FMT_VER_LOWEST && v <= SER_FMT_VER_HIGHEST_READ;
+}
/*
Misc. serialization functions