Codechange: let GetStringWithArgs use StringBuilder

This commit is contained in:
Rubidium
2023-05-18 18:33:18 +02:00
committed by rubidium42
parent ec7f9f63f6
commit 36aaa9d683
8 changed files with 106 additions and 77 deletions

View File

@@ -2431,11 +2431,9 @@ void Industry::RecomputeProductionMultipliers()
void Industry::FillCachedName() const
{
char buf[256];
int64 args_array[] = { this->index };
StringParameters tmp_params(args_array);
char *end = GetStringWithArgs(buf, STR_INDUSTRY_NAME, &tmp_params, lastof(buf));
this->cached_name.assign(buf, end);
this->cached_name = GetStringWithArgs(STR_INDUSTRY_NAME, &tmp_params);
}
void ClearAllIndustryCachedNames()