From 4e9be9326c0f5dfa0a14a78cd5a3cc192ff47ab5 Mon Sep 17 00:00:00 2001 From: Romain BOULLARD Date: Sun, 30 Aug 2026 12:41:33 +0200 Subject: [PATCH] do not evaluate if condition --- Bigfoot/Sources/Utils/Include/Utils/Log/LogMacros.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Bigfoot/Sources/Utils/Include/Utils/Log/LogMacros.hpp b/Bigfoot/Sources/Utils/Include/Utils/Log/LogMacros.hpp index b26df0d..ba8eb39 100644 --- a/Bigfoot/Sources/Utils/Include/Utils/Log/LogMacros.hpp +++ b/Bigfoot/Sources/Utils/Include/Utils/Log/LogMacros.hpp @@ -102,6 +102,7 @@ #define BIGFOOT_LOG_FATAL(loggerName, fmt, ...) #endif +#if defined BIGFOOT_NOT_OPTIMIZED #define BIGFOOT_LOG_DEBUG_IF(condition, loggerName, fmt, ...) \ do \ { \ @@ -155,4 +156,12 @@ BIGFOOT_LOG_FATAL(loggerName, fmt __VA_OPT__(, ) __VA_ARGS__); \ } \ } while (0) +#else +#define BIGFOOT_LOG_DEBUG_IF(condition, loggerName, fmt, ...) +#define BIGFOOT_LOG_TRACE_IF(condition, loggerName, fmt, ...) +#define BIGFOOT_LOG_INFO_IF(condition, loggerName, fmt, ...) +#define BIGFOOT_LOG_WARN_IF(condition, loggerName, fmt, ...) +#define BIGFOOT_LOG_ERROR_IF(condition, loggerName, fmt, ...) +#define BIGFOOT_LOG_FATAL_IF(condition, loggerName, fmt, ...) +#endif #endif