summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/saveload/saveload.cpp7
-rw-r--r--src/saveload/saveload.h1
2 files changed, 4 insertions, 4 deletions
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp
index 29fcf89da..c325c1ee5 100644
--- a/src/saveload/saveload.cpp
+++ b/src/saveload/saveload.cpp
@@ -1517,8 +1517,10 @@ size_t SlCalcObjMemberLength(const void *object, const SaveLoad &sld)
}
}
-bool SlObjectMember(void *ptr, const SaveLoad &sld)
+static bool SlObjectMember(void *object, const SaveLoad &sld)
{
+ void *ptr = GetVariableAddress(object, sld);
+
assert(IsVariableSizeRight(sld));
VarType conv = GB(sld.conv, 0, 8);
@@ -1604,8 +1606,7 @@ void SlObject(void *object, const SaveLoadTable &slt)
}
for (auto &sld : slt) {
- void *ptr = GetVariableAddress(object, sld);
- SlObjectMember(ptr, sld);
+ SlObjectMember(object, sld);
}
}
diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h
index 53a81f7c2..e320c7d8b 100644
--- a/src/saveload/saveload.h
+++ b/src/saveload/saveload.h
@@ -905,7 +905,6 @@ void SlWriteByte(byte b);
void SlGlobList(const SaveLoadTable &slt);
void SlArray(void *array, size_t length, VarType conv);
void SlObject(void *object, const SaveLoadTable &slt);
-bool SlObjectMember(void *object, const SaveLoad &sld);
void NORETURN SlError(StringID string, const char *extra_msg = nullptr);
void NORETURN SlErrorCorrupt(const char *msg);
void NORETURN SlErrorCorruptFmt(const char *format, ...) WARN_FORMAT(1, 2);