summaryrefslogtreecommitdiff
path: root/src/saveload.h
diff options
context:
space:
mode:
authorKUDr <kudr@openttd.org>2007-01-14 21:03:21 +0000
committerKUDr <kudr@openttd.org>2007-01-14 21:03:21 +0000
commitf8a434e9fc808dcac88b851386df5348ebbbda43 (patch)
tree503a72c72c0782e2575e32241326c275442bc90d /src/saveload.h
parentb028d8c2011e1bcee7ccb651d748728299545463 (diff)
downloadopenttd-f8a434e9fc808dcac88b851386df5348ebbbda43.tar.xz
(svn r8131) -Fix (r8125): g++ warning: 'invalid access to non-static data member ‘<class>::<member>’ of NULL object'. It is weird, but renaming the 'offsetof' macro helped.
Diffstat (limited to 'src/saveload.h')
-rw-r--r--src/saveload.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/saveload.h b/src/saveload.h
index 7f7a190c6..b6abc4334 100644
--- a/src/saveload.h
+++ b/src/saveload.h
@@ -183,7 +183,7 @@ typedef struct SaveLoad {
typedef SaveLoad SaveLoadGlobVarList;
/* Simple variables, references (pointers) and arrays */
-#define SLE_GENERAL(cmd, base, variable, type, length, from, to) {cmd, type, length, from, to, (void*)offsetof(base, variable)}
+#define SLE_GENERAL(cmd, base, variable, type, length, from, to) {cmd, type, length, from, to, (void*)cpp_offsetof(base, variable)}
#define SLE_CONDVAR(base, variable, type, from, to) SLE_GENERAL(SL_VAR, base, variable, type, 0, from, to)
#define SLE_CONDREF(base, variable, type, from, to) SLE_GENERAL(SL_REF, base, variable, type, 0, from, to)
#define SLE_CONDARR(base, variable, type, length, from, to) SLE_GENERAL(SL_ARR, base, variable, type, length, from, to)