summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAyexor <9105454+Ayexor@users.noreply.github.com>2024-06-19 14:18:46 +0200
committerStanislaw Halik <sthalik@misaki.pl>2024-06-19 14:24:50 +0200
commit2f9b016c9459c745213bb28492645c5bb10cbc7b (patch)
tree4eec0398a0c41c5ec652aea060ed5a12a46c9f1a
parent22eb9a80a37292917c2c5353535f320e3075c4b1 (diff)
Remove 'eval_once' completely if QT_NO_DEBUG_OUTPUT is defined.
-rw-r--r--compat/macros.h6
1 files changed, 5 insertions, 1 deletions
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; \