Tidy up INITIALIZE_ONCE use in console.cpp a bit

This commit is contained in:
Gunnar Beutner 2017-11-23 09:46:06 +01:00
parent 63fd6e3905
commit ebc11d41a5
1 changed files with 2 additions and 5 deletions

View File

@ -25,8 +25,7 @@ using namespace icinga;
static ConsoleType l_ConsoleType = Console_Dumb; static ConsoleType l_ConsoleType = Console_Dumb;
static void InitializeConsole(void) INITIALIZE_ONCE([]() {
{
l_ConsoleType = Console_Dumb; l_ConsoleType = Console_Dumb;
#ifndef _WIN32 #ifndef _WIN32
@ -35,9 +34,7 @@ static void InitializeConsole(void)
#else /* _WIN32 */ #else /* _WIN32 */
l_ConsoleType = Console_Windows; l_ConsoleType = Console_Windows;
#endif /* _WIN32 */ #endif /* _WIN32 */
} })
INITIALIZE_ONCE(InitializeConsole);
ConsoleColorTag::ConsoleColorTag(int color, ConsoleType consoleType) ConsoleColorTag::ConsoleColorTag(int color, ConsoleType consoleType)
: m_Color(color), m_ConsoleType(consoleType) : m_Color(color), m_ConsoleType(consoleType)