diff options
| author | Andreas Fankhauser hiddenalpha.ch | 2026-05-15 19:40:13 +0200 |
|---|---|---|
| committer | Andreas Fankhauser hiddenalpha.ch | 2026-05-15 19:40:13 +0200 |
| commit | b71994725ceb3c347c1f89264a919fc742da4bfa (patch) | |
| tree | 5b8220cc24c3031e2b7ca6c58b77267505c87b5c | |
| parent | ecef395c137234f4ab71576450ddcdd15f64374f (diff) | |
| download | Qntan-b71994725ceb3c347c1f89264a919fc742da4bfa.tar.gz Qntan-b71994725ceb3c347c1f89264a919fc742da4bfa.zip | |
Optimize-out trace logs for release builds
| -rw-r--r-- | include/qntan/Log.h | 6 |
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 |
