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:
@@ -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
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user