summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-11-12 08:37:12 +0000
committerrubidium <rubidium@openttd.org>2011-11-12 08:37:12 +0000
commitc9a7f572ecb902304efe0c864f565e703c8e98c8 (patch)
tree24ade13ff9268018a5870d8dbeab3abbb223a0ff /src/saveload
parent4f87d2e88c4b42f4ae4a5c7956f2287740ef174b (diff)
downloadopenttd-c9a7f572ecb902304efe0c864f565e703c8e98c8.tar.xz
(svn r23195) -Codechange: if we really need to cast away constness, use const_cast
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/saveload.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h
index 0090b6be3..db3af4dd9 100644
--- a/src/saveload/saveload.h
+++ b/src/saveload/saveload.h
@@ -514,7 +514,7 @@ static inline bool IsNumericType(VarType conv)
*/
static inline void *GetVariableAddress(const void *object, const SaveLoad *sld)
{
- return (byte*)(sld->global ? NULL : object) + (ptrdiff_t)sld->address;
+ return const_cast<byte *>((const byte*)(sld->global ? NULL : object) + (ptrdiff_t)sld->address);
}
int64 ReadValue(const void *ptr, VarType conv);