summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2020-12-05 11:33:42 +0100
committerPatric Stout <github@truebrain.nl>2020-12-06 16:10:58 +0100
commit731af1f1f3246720cc262e3f84fdef83114337bc (patch)
tree27b90bccd50f8a7b18f74ddec00cb9cc3e44f717 /src/saveload
parentc98717cb4518d80ccccb2ae1677d0a394542f129 (diff)
downloadopenttd-731af1f1f3246720cc262e3f84fdef83114337bc.tar.xz
Codechange: don't do work GetVariableAddress() is already doing
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/saveload.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp
index 8cf6a3923..999a381d7 100644
--- a/src/saveload/saveload.cpp
+++ b/src/saveload/saveload.cpp
@@ -1619,7 +1619,7 @@ void SlObject(void *object, const SaveLoad *sld)
}
for (; sld->cmd != SL_END; sld++) {
- void *ptr = sld->global ? sld->address : GetVariableAddress(object, sld);
+ void *ptr = GetVariableAddress(object, sld);
SlObjectMember(ptr, sld);
}
}