forked from rosebudai/OpenRCT2-Web
Do not allocate vector each time format string legacy is called
This commit is contained in:
1 parent
ad52abf39a
commit
b0e57c0ca9
1 file changed
+2
-1
@@ -808,7 +808,8 @@ namespace OpenRCT2
|
||||
|
||||
size_t FormatStringLegacy(char* buffer, size_t bufferLen, rct_string_id id, const void* args)
|
||||
{
|
||||
std::vector<FormatArg_t> anyArgs;
|
||||
thread_local std::vector<FormatArg_t> anyArgs;
|
||||
anyArgs.clear();
|
||||
auto fmt = GetFmtStringById(id);
|
||||
BuildAnyArgListFromLegacyArgBuffer(fmt, anyArgs, args);
|
||||
return FormatStringAny(buffer, bufferLen, fmt, anyArgs);
|
||||
|
||||
Reference in new issue
Block a user