mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-19 10:22:39 +01:00
Codechange: Use GetString() with argument parameters in simple cases. (#13551)
Avoids using global string parameters.
This commit is contained in:
@@ -277,8 +277,7 @@ private:
|
||||
}
|
||||
for (const Town *t : Town::Iterate()) {
|
||||
/* Get the town-name via the string-system */
|
||||
SetDParam(0, t->index);
|
||||
std::string town_name = GetString(STR_TOWN_NAME);
|
||||
std::string town_name = GetString(STR_TOWN_NAME, t->index);
|
||||
if (town_name.starts_with(query)) {
|
||||
suggestions.push_back(std::move(town_name));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user