mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Light optimization in engine logger sink
Only copy the string buffer our once.
This commit is contained in:
parent
d2fca23cf5
commit
acb68a559a
@ -290,11 +290,12 @@ void EngineLoggerSink(LogType_t logType, LogLevel_t logLevel, eDLL_T context,
|
||||
|
||||
if (g_bSpdLog_PostInit)
|
||||
{
|
||||
g_pConsole->AddLog(ConLog_t(g_LogStream.str(), overlayColor));
|
||||
const string logStreamBuf = g_LogStream.str();
|
||||
g_pConsole->AddLog(ConLog_t(logStreamBuf, overlayColor));
|
||||
|
||||
if (logLevel >= LogLevel_t::LEVEL_NOTIFY) // Draw to mini console.
|
||||
{
|
||||
g_pOverlay->AddLog(overlayContext, g_LogStream.str());
|
||||
g_pOverlay->AddLog(overlayContext, logStreamBuf);
|
||||
}
|
||||
}
|
||||
#endif // !DEDICATED
|
||||
|
Loading…
x
Reference in New Issue
Block a user