From 2f9b016c9459c745213bb28492645c5bb10cbc7b Mon Sep 17 00:00:00 2001 From: Ayexor <9105454+Ayexor@users.noreply.github.com> Date: Wed, 19 Jun 2024 14:18:46 +0200 Subject: Remove 'eval_once' completely if QT_NO_DEBUG_OUTPUT is defined. --- compat/macros.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compat/macros.h b/compat/macros.h index 237bef15..7de7fb86 100644 --- a/compat/macros.h +++ b/compat/macros.h @@ -38,7 +38,11 @@ # define progn(...) ([&]() -> decltype(auto) { __VA_ARGS__ }()) # define eval_once2(expr, ctr) eval_once3(expr, ctr) # define eval_once3(expr, ctr) ([&] { [[maybe_unused]] static const char init_ ## ctr = ((void)(expr), 0); }()) -# define eval_once(expr) eval_once2(expr, __COUNTER__) +# ifdef QT_NO_DEBUG_OUTPUT +# define eval_once(expr) void() +# else +# define eval_once(expr) eval_once2(expr, __COUNTER__) +# endif #define OTR_DISABLE_MOVE_COPY(type) \ type(const type&) = delete; \ -- cgit v1.2.3