(svn r23195) -Codechange: if we really need to cast away constness, use const_cast

This commit is contained in:
rubidium
2011-11-12 08:37:12 +00:00
parent 4f87d2e88c
commit c9a7f572ec
4 changed files with 5 additions and 5 deletions

View File

@@ -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);