summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorRubidium <rubidium@openttd.org>2021-07-08 19:20:41 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-07-09 22:53:30 +0200
commit01139d33686945db4ccb77b62acadf2caab3b93e (patch)
tree62ed03494a78910043ef1e4275a3dd3816e31996 /src/saveload
parent94881f5a34340c0398599e09d27c0c9a205294b4 (diff)
downloadopenttd-01139d33686945db4ccb77b62acadf2caab3b93e.tar.xz
Codechange: access the name of a setting via an accessor function
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/settings_sl.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/saveload/settings_sl.cpp b/src/saveload/settings_sl.cpp
index 8b683564b..a93979238 100644
--- a/src/saveload/settings_sl.cpp
+++ b/src/saveload/settings_sl.cpp
@@ -84,15 +84,15 @@ static std::vector<SaveLoad> GetSettingsDesc(const SettingTable &settings, bool
if (is_loading && (sd->flags & SF_NO_NETWORK_SYNC) && _networking && !_network_server) {
if (IsSavegameVersionBefore(SLV_TABLE_CHUNKS)) {
/* We don't want to read this setting, so we do need to skip over it. */
- saveloads.push_back({sd->name, sd->save.cmd, GetVarFileType(sd->save.conv) | SLE_VAR_NULL, sd->save.length, sd->save.version_from, sd->save.version_to, 0, nullptr, 0, nullptr});
+ saveloads.push_back({sd->GetName(), sd->save.cmd, GetVarFileType(sd->save.conv) | SLE_VAR_NULL, sd->save.length, sd->save.version_from, sd->save.version_to, 0, nullptr, 0, nullptr});
}
continue;
}
SaveLoad sv = sd->save;
/* Replace the name with the actual name of the setting. */
- assert(!sd->name.empty());
- sv.name = sd->name;
+ assert(!sd->GetName().empty());
+ sv.name = sd->GetName();
saveloads.push_back(sv);
}