Codechange: Use parameterised-GetString for vehicle related windows.

This commit is contained in:
Peter Nelson
2025-02-21 23:38:34 +00:00
committed by Peter Nelson
parent 0428f8c667
commit 24d327a30b
10 changed files with 301 additions and 461 deletions

View File

@@ -59,6 +59,15 @@ inline StringID MakeStringID(StringTab tab, StringIndexInTab index)
return (tab << TAB_SIZE_BITS) + index.base();
}
/**
* Prepare the string parameters for the next formatting run, resetting the type information.
* This is only necessary if parameters are reused for multiple format runs.
*/
static inline void PrepareArgsForNextRun(std::span<StringParameter> args)
{
for (auto &param : args) param.type = 0;
}
std::string GetStringWithArgs(StringID string, std::span<StringParameter> args);
std::string GetString(StringID string);
const char *GetStringPtr(StringID string);