mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 11:49:06 +00: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:
parent
6bf10e0276
commit
7855e5f73b
6 changed files with 14 additions and 16 deletions
|
@ -77,7 +77,7 @@ void LogConfigWidget::CreateWidgets()
|
|||
verbosity_layout->addWidget(m_verbosity_error);
|
||||
verbosity_layout->addWidget(m_verbosity_warning);
|
||||
verbosity_layout->addWidget(m_verbosity_info);
|
||||
if constexpr (MAX_LOGLEVEL == Common::Log::LOG_LEVELS::LDEBUG)
|
||||
if constexpr (Common::Log::MAX_LOGLEVEL == Common::Log::LOG_LEVELS::LDEBUG)
|
||||
{
|
||||
verbosity_layout->addWidget(m_verbosity_debug);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue