[Scummvm-git-logs] scummvm master -> c4e8320ed47006033d525a90bd0a47b6259aa09b
aquadran
noreply at scummvm.org
Mon May 30 17:42:32 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
c4e8320ed4 AGS: Avoid global constructor
Commit: c4e8320ed47006033d525a90bd0a47b6259aa09b
https://github.com/scummvm/scummvm/commit/c4e8320ed47006033d525a90bd0a47b6259aa09b
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2022-05-30T19:42:27+02:00
Commit Message:
AGS: Avoid global constructor
Changed paths:
engines/ags/engine/game/savegame_components.cpp
diff --git a/engines/ags/engine/game/savegame_components.cpp b/engines/ags/engine/game/savegame_components.cpp
index f563094e54e..7537458e098 100644
--- a/engines/ags/engine/game/savegame_components.cpp
+++ b/engines/ags/engine/game/savegame_components.cpp
@@ -68,8 +68,6 @@ namespace Engine {
namespace SavegameComponents {
-const String ComponentListTag = "Components";
-
void WriteFormatTag(Stream *out, const String &tag, bool open = true) {
String full_tag = String::FromFormat(open ? "<%s>" : "</%s>", tag.GetCStr());
out->Write(full_tag.GetCStr(), full_tag.GetLength());
@@ -1221,6 +1219,7 @@ HSaveError ReadAll(Stream *in, SavegameVersion svg_version, const PreservedParam
GenerateHandlersMap(hlp.Handlers);
size_t idx = 0;
+ const String ComponentListTag = "Components";
if (!AssertFormatTag(in, ComponentListTag, true))
return new SavegameError(kSvgErr_ComponentListOpeningTagFormat);
do {
@@ -1262,6 +1261,7 @@ HSaveError WriteComponent(Stream *out, ComponentHandler &hdlr) {
}
HSaveError WriteAllCommon(Stream *out) {
+ const String ComponentListTag = "Components";
WriteFormatTag(out, ComponentListTag, true);
for (int type = 0; !ComponentHandlers[type].Name.IsEmpty(); ++type) {
HSaveError err = WriteComponent(out, ComponentHandlers[type]);
More information about the Scummvm-git-logs
mailing list