Codechange: C++-ify lists for SaveLoad (#9323)

Basically, this changes "SaveLoad *" to either:
1) "SaveLoadTable" if a list of SaveLoads was meant
2) "SaveLoad &" if a single entry was meant

As added bonus, this removes SL_END / SLE_END / SLEG_END. This
also adds core/span.hpp, a "std::span"-lite.
This commit is contained in:
Patric Stout
2021-05-31 22:26:44 +02:00
committed by GitHub
parent 956d761e3e
commit 9fff00ba20
41 changed files with 213 additions and 223 deletions

View File

@@ -30,7 +30,6 @@ static const SaveLoad _game_script[] = {
SLEG_SSTR(_game_saveload_settings, SLE_STR),
SLEG_VAR(_game_saveload_version, SLE_UINT32),
SLEG_VAR(_game_saveload_is_random, SLE_BOOL),
SLE_END()
};
static void SaveReal_GSDT(int *index_ptr)
@@ -117,12 +116,10 @@ static uint _game_saveload_strings;
static const SaveLoad _game_language_header[] = {
SLEG_SSTR(_game_saveload_string, SLE_STR),
SLEG_VAR(_game_saveload_strings, SLE_UINT32),
SLE_END()
};
static const SaveLoad _game_language_string[] = {
SLEG_SSTR(_game_saveload_string, SLE_STR | SLF_ALLOW_CONTROL),
SLE_END()
};
static void SaveReal_GSTR(const LanguageStrings *ls)