1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-17 17:32:45 +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

@@ -100,9 +100,7 @@ class DropDownListCompanyItem : public DropDownIcon<DropDownIcon<DropDownString<
public:
DropDownListCompanyItem(CompanyID company, bool shaded) : DropDownIcon<DropDownIcon<DropDownString<DropDownListItem>, true>>(SPR_COMPANY_ICON, COMPANY_SPRITE_COLOUR(company), NetworkCanJoinCompany(company) ? SPR_EMPTY : SPR_LOCK, PAL_NONE, STR_NULL, company, false, shaded)
{
SetDParam(0, company);
SetDParam(1, company);
this->SetString(GetString(STR_COMPANY_NAME_COMPANY_NUM));
this->SetString(GetString(STR_COMPANY_NAME_COMPANY_NUM, company, company));
}
};