diff options
author | rubidium <rubidium@openttd.org> | 2011-11-12 08:37:12 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-11-12 08:37:12 +0000 |
commit | c9a7f572ecb902304efe0c864f565e703c8e98c8 (patch) | |
tree | 24ade13ff9268018a5870d8dbeab3abbb223a0ff /src/saveload | |
parent | 4f87d2e88c4b42f4ae4a5c7956f2287740ef174b (diff) | |
download | openttd-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.h | 2 |
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); |