mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Turn MAX_LOGLEVEL into a true constant (and fix self-comparison warning)
This replaces the MAX_LOGLEVEL define with a constexpr variable in order to fix self-comparison warnings in the logging macros when compiling with Clang. (Without this change, the log level check in the logging macros is expanded into something like this: `if (LINFO <= LINFO)`, which triggers a tautological compare warning.)
This commit is contained in:
@ -21,7 +21,7 @@
|
||||
#define DEBUG_ASSERT_MSG(_t_, _a_, _msg_, ...) \
|
||||
do \
|
||||
{ \
|
||||
if constexpr (MAX_LOGLEVEL >= Common::Log::LOG_LEVELS::LDEBUG) \
|
||||
if constexpr (Common::Log::MAX_LOGLEVEL >= Common::Log::LOG_LEVELS::LDEBUG) \
|
||||
{ \
|
||||
if (!(_a_)) \
|
||||
{ \
|
||||
@ -43,6 +43,6 @@
|
||||
#define DEBUG_ASSERT(_a_) \
|
||||
do \
|
||||
{ \
|
||||
if constexpr (MAX_LOGLEVEL >= Common::Log::LOG_LEVELS::LDEBUG) \
|
||||
if constexpr (Common::Log::MAX_LOGLEVEL >= Common::Log::LOG_LEVELS::LDEBUG) \
|
||||
ASSERT(_a_); \
|
||||
} while (0)
|
||||
|
Reference in New Issue
Block a user