From 4f7a25eb7389a3c269858c279b4c30d3d46ddbdf Mon Sep 17 00:00:00 2001 From: Jakob Rath Date: Thu, 23 Mar 2023 14:16:48 +0100 Subject: [PATCH] fix IF_LOGGING macro --- src/math/polysat/log.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/math/polysat/log.h b/src/math/polysat/log.h index 98e1e53db..e7720bb13 100644 --- a/src/math/polysat/log.h +++ b/src/math/polysat/log.h @@ -102,9 +102,11 @@ polysat_log(LogLevel msg_level, std::string fn, std::string pretty_fn); #define COND_LOG(c, x) if (c) LOG(x) #define LOGE(x) LOG(#x << " = " << (x)) -#define IF_LOGGING(x) \ - do { \ - x; \ +#define IF_LOGGING(x) \ + do { \ + if (get_log_enabled()) { \ + x; \ + } \ } while (false)