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

@@ -448,7 +448,7 @@ static bool CheckRoadSide(int32_t &)
static std::optional<uint32_t> ConvertLandscape(std::string_view value)
{
/* try with the old values */
static std::vector<std::string_view> _old_landscape_values{"normal", "hilly", "desert", "candy"};
static constexpr std::initializer_list<std::string_view> _old_landscape_values{"normal"sv, "hilly"sv, "desert"sv, "candy"sv};
return OneOfManySettingDesc::ParseSingleValue(value, _old_landscape_values);
}