Codechange: Use GetString() with argument parameters in simple cases. (#13551)

Avoids using global string parameters.
This commit is contained in:
2025-02-14 00:10:56 +00:00
committed by GitHub
parent c3d5e6d2a0
commit 20e57a02a2
26 changed files with 79 additions and 170 deletions

View File

@@ -339,8 +339,7 @@ static void FiosGetFileList(SaveLoadOperation fop, bool show_dirs, FiosGetTypeAn
fios.type = FIOS_TYPE_PARENT;
fios.mtime = 0;
fios.name = "..";
SetDParamStr(0, "..");
fios.title = GetString(STR_SAVELOAD_PARENT_DIRECTORY);
fios.title = GetString(STR_SAVELOAD_PARENT_DIRECTORY, "..");
sort_start = file_list.size();
}
@@ -354,8 +353,7 @@ static void FiosGetFileList(SaveLoadOperation fop, bool show_dirs, FiosGetTypeAn
fios.type = FIOS_TYPE_DIR;
fios.mtime = 0;
fios.name = FS2OTTD(dir_entry.path().filename());
SetDParamStr(0, fios.name + PATHSEP);
fios.title = GetString(STR_SAVELOAD_DIRECTORY);
fios.title = GetString(STR_SAVELOAD_DIRECTORY, fios.name + PATHSEP);
}
/* Sort the subdirs always by name, ascending, remember user-sorting order */