mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Engine: don't grow the string buffer
Just switch the format string instead, avoids reallocs.
This commit is contained in:
parent
7607ca073f
commit
e223cec9c2
@ -247,12 +247,7 @@ void NET_PrintFunc(const char* fmt, ...)
|
|||||||
result = FormatV(fmt, args);
|
result = FormatV(fmt, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
if (result.back() != '\n')
|
Msg(context, result.back() == '\n' ? "%s" : "%s\n", result.c_str());
|
||||||
{
|
|
||||||
result.push_back('\n');
|
|
||||||
}
|
|
||||||
|
|
||||||
Msg(context, "%s", result.c_str());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user