fix(logger): wrap macro argument in parentheses

This commit is contained in:
Marcus Holland-Moritz 2025-03-15 12:46:12 +01:00
parent 9e0860d5bf
commit 42a904d4cd

View File

@ -335,8 +335,8 @@ class log_proxy {
#define LOG_DETAIL_LEVEL(level, lgr, method) \
if constexpr (std::decay_t<decltype(lgr)>::policy_is_enabled_for( \
::dwarfs::logger::level)) \
if (lgr.logger_is_enabled_for(::dwarfs::logger::level)) \
lgr.method(std::source_location::current())
if ((lgr).logger_is_enabled_for(::dwarfs::logger::level)) \
(lgr).method(std::source_location::current())
#define LOG_PROXY(policy, lgr) ::dwarfs::log_proxy<policy> log_(lgr)
#define LOG_PROXY_DECL(policy) ::dwarfs::log_proxy<policy> log_