Rename CConLog to ConLog_t

This commit is contained in:
Kawe Mazidjatari 2022-06-26 17:40:02 +02:00
parent 2da11d2d32
commit 98c43fd6c1
8 changed files with 18 additions and 18 deletions

View File

@ -92,7 +92,7 @@ void CBaseFileSystem::Warning(CBaseFileSystem* pFileSystem, FileWarningLevel_t l
wconsole->debug(szBuf); wconsole->debug(szBuf);
#ifndef DEDICATED #ifndef DEDICATED
iconsole->debug(szBuf); iconsole->debug(szBuf);
g_pConsole->AddLog(CConLog(g_spd_sys_w_oss.str(), ImVec4(1.00f, 1.00f, 0.00f, 1.00f))); g_pConsole->AddLog(ConLog_t(g_spd_sys_w_oss.str(), ImVec4(1.00f, 1.00f, 0.00f, 1.00f)));
g_spd_sys_w_oss.str(""); g_spd_sys_w_oss.str("");
g_spd_sys_w_oss.clear(); g_spd_sys_w_oss.clear();

View File

@ -814,7 +814,7 @@ int CConsole::TextEditCallbackStub(ImGuiInputTextCallbackData* iData)
// Purpose: adds logs to the vector // Purpose: adds logs to the vector
// Input : &conLog - // Input : &conLog -
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void CConsole::AddLog(const CConLog& conLog) void CConsole::AddLog(const ConLog_t& conLog)
{ {
m_Logger.InsertText(conLog); m_Logger.InsertText(conLog);
} }
@ -833,7 +833,7 @@ void CConsole::AddLog(const ImVec4& color, const char* fmt, ...) IM_FMTARGS(2)
buf[IM_ARRAYSIZE(buf) - 1] = 0; buf[IM_ARRAYSIZE(buf) - 1] = 0;
va_end(args); va_end(args);
m_Logger.InsertText(CConLog(Strdup(buf), color)); m_Logger.InsertText(ConLog_t(Strdup(buf), color));
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@ -111,7 +111,7 @@ public:
static int TextEditCallbackStub(ImGuiInputTextCallbackData* pData); static int TextEditCallbackStub(ImGuiInputTextCallbackData* pData);
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
void AddLog(const CConLog& conLog); void AddLog(const ConLog_t& conLog);
void AddLog(const ImVec4& color, const char* fmt, ...) IM_FMTARGS(2); void AddLog(const ImVec4& color, const char* fmt, ...) IM_FMTARGS(2);
void ClearLog(void); void ClearLog(void);

View File

@ -174,7 +174,7 @@ SQRESULT SQVM_PrintFunc(HSQUIRRELVM v, SQChar* fmt, ...)
} }
} }
g_pConsole->AddLog(CConLog(g_spd_sys_w_oss.str(), color)); g_pConsole->AddLog(ConLog_t(g_spd_sys_w_oss.str(), color));
g_pLogSystem.AddLog(static_cast<LogType_t>(context), g_spd_sys_w_oss.str()); g_pLogSystem.AddLog(static_cast<LogType_t>(context), g_spd_sys_w_oss.str());
g_spd_sys_w_oss.str(""); g_spd_sys_w_oss.str("");
@ -246,7 +246,7 @@ SQRESULT SQVM_WarningFunc(HSQUIRRELVM v, SQInteger a2, SQInteger a3, SQInteger*
#ifndef DEDICATED #ifndef DEDICATED
iconsole->debug(vmStr); // Emit to in-game console. iconsole->debug(vmStr); // Emit to in-game console.
g_pConsole->AddLog(CConLog(g_spd_sys_w_oss.str(), ImVec4(1.00f, 1.00f, 0.00f, 0.80f))); g_pConsole->AddLog(ConLog_t(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_pLogSystem.AddLog(LogType_t::WARNING_C, g_spd_sys_w_oss.str());
g_spd_sys_w_oss.str(""); g_spd_sys_w_oss.str("");

View File

@ -12,9 +12,9 @@
#include <mutex> #include <mutex>
#include "imgui.h" #include "imgui.h"
struct CConLog struct ConLog_t
{ {
CConLog(const std::string& svConLog, const ImVec4& imColor) ConLog_t(const std::string& svConLog, const ImVec4& imColor)
{ {
m_svConLog = svConLog; m_svConLog = svConLog;
m_imColor = imColor; m_imColor = imColor;
@ -115,10 +115,10 @@ public:
void Render(); void Render();
void Copy(bool aCopyAll = false); void Copy(bool aCopyAll = false);
void SetText(const CConLog& aText); void SetText(const ConLog_t& aText);
std::string GetText() const; std::string GetText() const;
void SetTextLines(const std::vector<CConLog>& aLines); void SetTextLines(const std::vector<ConLog_t>& aLines);
std::vector<std::string> GetTextLines() const; std::vector<std::string> GetTextLines() const;
ImGuiTextFilter GetFilter() const { return m_itFilter; }; ImGuiTextFilter GetFilter() const { return m_itFilter; };
@ -146,7 +146,7 @@ public:
void SetTabSize(int aValue); void SetTabSize(int aValue);
inline int GetTabSize() const { return m_nTabSize; } inline int GetTabSize() const { return m_nTabSize; }
void InsertText(const CConLog& aValue); void InsertText(const ConLog_t& aValue);
void MoveUp(int aAmount = 1, bool aSelect = false); void MoveUp(int aAmount = 1, bool aSelect = false);
void MoveDown(int aAmount = 1, bool aSelect = false); void MoveDown(int aAmount = 1, bool aSelect = false);

View File

@ -913,7 +913,7 @@ void CTextLogger::Copy(bool aCopyAll)
} }
} }
void CTextLogger::SetText(const CConLog& aText) void CTextLogger::SetText(const ConLog_t& aText)
{ {
m_Lines.clear(); m_Lines.clear();
m_Lines.emplace_back(Line()); m_Lines.emplace_back(Line());
@ -928,7 +928,7 @@ void CTextLogger::SetText(const CConLog& aText)
} }
} }
void CTextLogger::SetTextLines(const std::vector<CConLog>& aLines) void CTextLogger::SetTextLines(const std::vector<ConLog_t>& aLines)
{ {
m_Lines.clear(); m_Lines.clear();
@ -1045,7 +1045,7 @@ void CTextLogger::SetTabSize(int aValue)
m_nTabSize = std::max(0, std::min(32, aValue)); m_nTabSize = std::max(0, std::min(32, aValue));
} }
void CTextLogger::InsertText(const CConLog & aValue) void CTextLogger::InsertText(const ConLog_t & aValue)
{ {
m_Mutex.lock(); m_Mutex.lock();

View File

@ -174,7 +174,7 @@ void DevMsg(eDLL_T context, const char* fmt, ...)
break; break;
} }
g_pConsole->AddLog(CConLog(g_spd_sys_w_oss.str(), color)); g_pConsole->AddLog(ConLog_t(g_spd_sys_w_oss.str(), color));
g_pLogSystem.AddLog(tLog, g_spd_sys_w_oss.str()); g_pLogSystem.AddLog(tLog, g_spd_sys_w_oss.str());
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 #ifndef DEDICATED
iconsole->info(svOut); iconsole->info(svOut);
g_pConsole->AddLog(CConLog(g_spd_sys_w_oss.str(), ImVec4(1.00f, 1.00f, 0.00f, 0.80f))); g_pConsole->AddLog(ConLog_t(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_pLogSystem.AddLog(LogType_t::WARNING_C, g_spd_sys_w_oss.str());
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 #ifndef DEDICATED
iconsole->info(svOut); iconsole->info(svOut);
g_pConsole->AddLog(CConLog(g_spd_sys_w_oss.str(), ImVec4(1.00f, 0.00f, 0.00f, 1.00f))); g_pConsole->AddLog(ConLog_t(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_pLogSystem.AddLog(LogType_t::ERROR_C, g_spd_sys_w_oss.str());
g_spd_sys_w_oss.str(""); g_spd_sys_w_oss.str("");

View File

@ -32,7 +32,7 @@ int HQHull_PrintFunc(const char* fmt, ...)
#ifndef DEDICATED #ifndef DEDICATED
iconsole->debug(buf); iconsole->debug(buf);
g_pConsole->AddLog(CConLog(g_spd_sys_w_oss.str(), ImVec4(0.81f, 0.81f, 0.81f, 1.00f))); g_pConsole->AddLog(ConLog_t(g_spd_sys_w_oss.str(), ImVec4(0.81f, 0.81f, 0.81f, 1.00f)));
g_spd_sys_w_oss.str(""); g_spd_sys_w_oss.str("");
g_spd_sys_w_oss.clear(); g_spd_sys_w_oss.clear();