1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-16 17:02:37 +01:00

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

Avoids using global string parameters.
This commit is contained in:
Peter Nelson
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

@@ -391,13 +391,9 @@ class BuildIndustryWindow : public Window {
}
if (numcargo > 0) {
SetDParam(0, CargoSpec::Get(cargolist[firstcargo])->name);
SetDParamStr(1, cargo_suffix[firstcargo].text);
cargostring = GetString(prefixstr) + cargostring;
cargostring = GetString(prefixstr, CargoSpec::Get(cargolist[firstcargo])->name, cargo_suffix[firstcargo].text) + cargostring;
} else {
SetDParam(0, STR_JUST_NOTHING);
SetDParamStr(1, "");
cargostring = GetString(prefixstr);
cargostring = GetString(prefixstr, STR_JUST_NOTHING, "");
}
return cargostring;