From: Gunnar Beutner Date: Thu, 23 Nov 2017 08:46:06 +0000 (+0100) Subject: Tidy up INITIALIZE_ONCE use in console.cpp a bit X-Git-Tag: v2.9.0~310^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ebc11d41a5fa530d98b40638519d526158a144c7;p=icinga2 Tidy up INITIALIZE_ONCE use in console.cpp a bit --- diff --git a/lib/base/console.cpp b/lib/base/console.cpp index 057807995..62dccd2df 100644 --- a/lib/base/console.cpp +++ b/lib/base/console.cpp @@ -25,8 +25,7 @@ using namespace icinga; static ConsoleType l_ConsoleType = Console_Dumb; -static void InitializeConsole(void) -{ +INITIALIZE_ONCE([]() { l_ConsoleType = Console_Dumb; #ifndef _WIN32 @@ -35,9 +34,7 @@ static void InitializeConsole(void) #else /* _WIN32 */ l_ConsoleType = Console_Windows; #endif /* _WIN32 */ -} - -INITIALIZE_ONCE(InitializeConsole); +}) ConsoleColorTag::ConsoleColorTag(int color, ConsoleType consoleType) : m_Color(color), m_ConsoleType(consoleType)