From 6ef5c057aa2a36dbd54f56780e5700e753b37bcf Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sun, 2 Feb 2014 20:10:23 +0000 Subject: Revert "Improved code" This reverts commit d8aa0b0ec7a2ebea2fc157c623ae8cd7d0b6ba1c. --- src/MCLogger.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/MCLogger.cpp') diff --git a/src/MCLogger.cpp b/src/MCLogger.cpp index aebe3e1c9..632ea2efe 100644 --- a/src/MCLogger.cpp +++ b/src/MCLogger.cpp @@ -11,10 +11,6 @@ cMCLogger * cMCLogger::s_MCLogger = NULL; bool g_ShouldColorOutput = false; -/** Flag to show whether a 'replace line' log command has been issued -Used to decide when to put a newline */ -bool g_BeginLineUpdate = false; - #ifdef _WIN32 #include // Needed for _isatty(), not available on Linux @@ -127,14 +123,14 @@ void cMCLogger::Log(const char * a_Format, va_list a_ArgList, bool a_ShouldRepla { cCSLock Lock(m_CriticalSection); - if (!g_BeginLineUpdate && a_ShouldReplaceLine) + if (!m_BeginLineUpdate && a_ShouldReplaceLine) { a_ShouldReplaceLine = false; // Print a normal line first if this is the initial replace line - g_BeginLineUpdate = true; + m_BeginLineUpdate = true; } - else if (g_BeginLineUpdate && !a_ShouldReplaceLine) + else if (m_BeginLineUpdate && !a_ShouldReplaceLine) { - g_BeginLineUpdate = false; + m_BeginLineUpdate = false; } if (a_ShouldReplaceLine) -- cgit v1.2.3