From 98741a95913007dcde596f5f8a26ec56eaa77f6f Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Tue, 21 Jun 2022 10:12:15 +0200 Subject: [PATCH] Remove redundant 'PrintPercentageEscape' calls --- r5dev/gameui/IConsole.cpp | 2 +- r5dev/squirrel/sqvm.cpp | 4 ++-- r5dev/tier0/dbg.cpp | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/r5dev/gameui/IConsole.cpp b/r5dev/gameui/IConsole.cpp index 98dfbc1a..2144058e 100644 --- a/r5dev/gameui/IConsole.cpp +++ b/r5dev/gameui/IConsole.cpp @@ -542,7 +542,7 @@ void CConsole::FindFromPartial(void) //----------------------------------------------------------------------------- void CConsole::ProcessCommand(const char* pszCommand) { - AddLog(ImVec4(1.00f, 0.80f, 0.60f, 1.00f), "%s] %s\n", Plat_GetProcessUpTime(), PrintPercentageEscape(pszCommand).c_str()); + AddLog(ImVec4(1.00f, 0.80f, 0.60f, 1.00f), "%s] %s\n", Plat_GetProcessUpTime(), pszCommand); std::thread t(CEngineClient_CommandExecute, this, pszCommand); t.detach(); // Detach from render thread. diff --git a/r5dev/squirrel/sqvm.cpp b/r5dev/squirrel/sqvm.cpp index 24e6757a..762285de 100644 --- a/r5dev/squirrel/sqvm.cpp +++ b/r5dev/squirrel/sqvm.cpp @@ -173,7 +173,7 @@ SQRESULT SQVM_PrintFunc(HSQUIRRELVM v, SQChar* fmt, ...) } } - g_pConsole->AddLog(CConLog(PrintPercentageEscape(g_spd_sys_w_oss.str()), color)); + g_pConsole->AddLog(CConLog(g_spd_sys_w_oss.str(), color)); g_pLogSystem.AddLog(static_cast(context), g_spd_sys_w_oss.str()); g_spd_sys_w_oss.str(""); @@ -245,7 +245,7 @@ SQRESULT SQVM_WarningFunc(HSQUIRRELVM v, SQInteger a2, SQInteger a3, SQInteger* #ifndef DEDICATED iconsole->debug(vmStr); // Emit to in-game console. - g_pConsole->AddLog(CConLog(PrintPercentageEscape(g_spd_sys_w_oss.str()), ImVec4(1.00f, 1.00f, 0.00f, 0.80f))); + g_pConsole->AddLog(CConLog(g_spd_sys_w_oss.str(), ImVec4(1.00f, 1.00f, 0.00f, 0.80f))); g_pLogSystem.AddLog(LogType_t::WARNING_C, g_spd_sys_w_oss.str()); g_spd_sys_w_oss.str(""); diff --git a/r5dev/tier0/dbg.cpp b/r5dev/tier0/dbg.cpp index bb7c6a5d..c2f31495 100644 --- a/r5dev/tier0/dbg.cpp +++ b/r5dev/tier0/dbg.cpp @@ -174,7 +174,7 @@ void DevMsg(eDLL_T context, const char* fmt, ...) break; } - g_pConsole->AddLog(CConLog(PrintPercentageEscape(g_spd_sys_w_oss.str()), color)); + g_pConsole->AddLog(CConLog(g_spd_sys_w_oss.str(), color)); g_pLogSystem.AddLog(tLog, g_spd_sys_w_oss.str()); g_spd_sys_w_oss.str(""); @@ -251,7 +251,7 @@ void Warning(eDLL_T context, const char* fmt, ...) #ifndef DEDICATED iconsole->info(svOut); - g_pConsole->AddLog(CConLog(PrintPercentageEscape(g_spd_sys_w_oss.str()), ImVec4(1.00f, 1.00f, 0.00f, 0.80f))); + g_pConsole->AddLog(CConLog(g_spd_sys_w_oss.str(), ImVec4(1.00f, 1.00f, 0.00f, 0.80f))); g_pLogSystem.AddLog(LogType_t::WARNING_C, g_spd_sys_w_oss.str()); g_spd_sys_w_oss.str(""); @@ -328,7 +328,7 @@ void Error(eDLL_T context, const char* fmt, ...) #ifndef DEDICATED iconsole->info(svOut); - g_pConsole->AddLog(CConLog(PrintPercentageEscape(g_spd_sys_w_oss.str()), ImVec4(1.00f, 0.00f, 0.00f, 1.00f))); + g_pConsole->AddLog(CConLog(g_spd_sys_w_oss.str(), ImVec4(1.00f, 0.00f, 0.00f, 1.00f))); g_pLogSystem.AddLog(LogType_t::ERROR_C, g_spd_sys_w_oss.str()); g_spd_sys_w_oss.str("");