1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-16 00:42:45 +01:00

Codechange: Add 'const' to static variables, which are only initialised once.

This commit is contained in:
frosch
2025-04-27 16:35:43 +02:00
committed by frosch
parent 1900125c98
commit 61cec33be2
20 changed files with 34 additions and 34 deletions

View File

@@ -1425,7 +1425,7 @@ void LoadFromConfig(bool startup)
}
if (generic_version < IFV_AUTOSAVE_RENAME && IsConversionNeeded(generic_ini, "gui", "autosave", "autosave_interval", &old_item)) {
static std::vector<std::string_view> _old_autosave_interval{"off", "monthly", "quarterly", "half year", "yearly"};
static constexpr std::initializer_list<std::string_view> _old_autosave_interval{"off"sv, "monthly"sv, "quarterly"sv, "half year"sv, "yearly"sv};
auto old_value = OneOfManySettingDesc::ParseSingleValue(*old_item->value, _old_autosave_interval).value_or(-1);
switch (old_value) {