mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-24 12:06:41 +00:00
Codechange: make SaveLoadOperation a scoped enum
This commit is contained in:
committed by
Peter Nelson
parent
04f7adb7b7
commit
93a6aa77c6
@@ -110,7 +110,7 @@ public:
|
||||
void ValidateFileList(bool force_reload = false)
|
||||
{
|
||||
if (force_reload || !this->file_list_valid) {
|
||||
this->BuildFileList(this->abstract_filetype, SLO_LOAD, this->show_dirs);
|
||||
this->BuildFileList(this->abstract_filetype, SaveLoadOperation::Load, this->show_dirs);
|
||||
this->file_list_valid = true;
|
||||
}
|
||||
}
|
||||
@@ -425,7 +425,7 @@ static bool ConSave(std::span<std::string_view> argv)
|
||||
std::string filename = fmt::format("{}.sav", argv[1]);
|
||||
IConsolePrint(CC_DEFAULT, "Saving map...");
|
||||
|
||||
if (SaveOrLoad(filename, SLO_SAVE, DetailedFileType::GameFile, SAVE_DIR) != SL_OK) {
|
||||
if (SaveOrLoad(filename, SaveLoadOperation::Save, DetailedFileType::GameFile, SAVE_DIR) != SL_OK) {
|
||||
IConsolePrint(CC_ERROR, "Saving map failed.");
|
||||
} else {
|
||||
IConsolePrint(CC_INFO, "Map successfully saved to '{}'.", filename);
|
||||
|
||||
Reference in New Issue
Block a user