1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

build: reduce usage of constexpr

some compilers has lack of proper support for that
This commit is contained in:
Alexander Alekhin
2019-04-22 15:41:27 +03:00
parent 8af96248bf
commit 44bd849697
6 changed files with 59 additions and 28 deletions
+8 -4
View File
@@ -31,14 +31,13 @@ struct GlobalLoggingInitStruct
{
public:
#if defined NDEBUG
static constexpr bool m_isDebugBuild = false;
static const bool m_isDebugBuild = false;
#else
static constexpr bool m_isDebugBuild = true;
static const bool m_isDebugBuild = true;
#endif
public:
static constexpr LogLevel m_defaultUnconfiguredGlobalLevel =
m_isDebugBuild ? LOG_LEVEL_DEBUG : LOG_LEVEL_WARNING;
static LogLevel m_defaultUnconfiguredGlobalLevel;
public:
LogTagManager logTagManager;
@@ -75,6 +74,11 @@ private:
}
};
LogLevel GlobalLoggingInitStruct::m_defaultUnconfiguredGlobalLevel = GlobalLoggingInitStruct::m_isDebugBuild
? LOG_LEVEL_DEBUG
: LOG_LEVEL_WARNING;
// Static dynamic initialization guard function for the combined struct
// just defined above
//