From ebc11d41a5fa530d98b40638519d526158a144c7 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 23 Nov 2017 09:46:06 +0100 Subject: [PATCH] Tidy up INITIALIZE_ONCE use in console.cpp a bit --- lib/base/console.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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)