summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2016-12-25 13:26:15 +0000
committerfrosch <frosch@openttd.org>2016-12-25 13:26:15 +0000
commit4342798ff5100c8b5974c8c41c7b4f667f09883d (patch)
tree8d2e3e5ef3c94602a7b4ff633d4505976fcd045e /src
parent9afb705125d7b17780ac81190981ba680d3473e9 (diff)
downloadopenttd-4342798ff5100c8b5974c8c41c7b4f667f09883d.tar.xz
(svn r27709) -Fix-ish: Silence some warnings. (adf88)
Diffstat (limited to 'src')
-rw-r--r--src/saveload/saveload.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp
index 87df2c3a6..fcda489fa 100644
--- a/src/saveload/saveload.cpp
+++ b/src/saveload/saveload.cpp
@@ -1484,6 +1484,8 @@ size_t SlCalcObjMemberLength(const void *object, const SaveLoad *sld)
return 0;
}
+#ifdef OTTD_ASSERT
+
/**
* Check whether the variable size of the variable in the saveload configuration
* matches with the actual variable size.
@@ -1524,9 +1526,13 @@ static bool IsVariableSizeRight(const SaveLoad *sld)
}
}
+#endif /* OTTD_ASSERT */
+
bool SlObjectMember(void *ptr, const SaveLoad *sld)
{
+#ifdef OTTD_ASSERT
assert(IsVariableSizeRight(sld));
+#endif
VarType conv = GB(sld->conv, 0, 8);
switch (sld->cmd) {