mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-17 09:22:42 +01:00
Codechange: Add 'const' to static variables, which are only initialised once.
This commit is contained in:
@@ -716,7 +716,7 @@ FiosNumberedSaveName::FiosNumberedSaveName(const std::string &prefix) : prefix(p
|
||||
static std::string _prefix; ///< Static as the lambda needs access to it.
|
||||
|
||||
/* Callback for FiosFileScanner. */
|
||||
static FiosGetTypeAndNameProc *proc = [](SaveLoadOperation, std::string_view file, std::string_view ext) {
|
||||
static FiosGetTypeAndNameProc *const proc = [](SaveLoadOperation, std::string_view file, std::string_view ext) {
|
||||
if (StrEqualsIgnoreCase(ext, ".sav") && file.starts_with(_prefix)) return std::tuple(FIOS_TYPE_FILE, std::string{});
|
||||
return std::tuple(FIOS_TYPE_INVALID, std::string{});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user