summaryrefslogtreecommitdiff
path: root/include/qntan
diff options
context:
space:
mode:
authorAndreas Fankhauser hiddenalpha.ch2026-05-15 19:40:13 +0200
committerAndreas Fankhauser hiddenalpha.ch2026-05-15 19:40:13 +0200
commitb71994725ceb3c347c1f89264a919fc742da4bfa (patch)
tree5b8220cc24c3031e2b7ca6c58b77267505c87b5c /include/qntan
parentecef395c137234f4ab71576450ddcdd15f64374f (diff)
downloadQntan-b71994725ceb3c347c1f89264a919fc742da4bfa.tar.gz
Qntan-b71994725ceb3c347c1f89264a919fc742da4bfa.zip
Optimize-out trace logs for release builds
Diffstat (limited to 'include/qntan')
-rw-r--r--include/qntan/Log.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/qntan/Log.h b/include/qntan/Log.h
index 87adba3..4b8efe6 100644
--- a/include/qntan/Log.h
+++ b/include/qntan/Log.h
@@ -28,7 +28,11 @@ extern "C" {
#endif
#ifndef LOGT
-# define LOGT(A, ...) if(A) (*(A))->trace(A, __VA_ARGS__)
+# if !NDEBUG
+# define LOGT(A, ...) if(A) (*(A))->trace(A, __VA_ARGS__)
+# else
+# define LOGT(A, ...) /*optimized away*/
+# endif
#endif