From f5127be2865c90b26de896c1adbc5a19ea3a0bd6 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Sat, 15 Jun 2024 11:42:06 -0700 Subject: Use __VA_OPT__ --- cassert/include/cassert.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cassert/include/cassert.h b/cassert/include/cassert.h index 8cd1391..acfcb0f 100644 --- a/cassert/include/cassert.h +++ b/cassert/include/cassert.h @@ -7,18 +7,18 @@ #ifndef LOGE #include // __VA_OPT__ is not available until C2X. -/*#define LOGE(format, ...) \ -// { \ -// fprintf( \ -// stderr, "[ASSERT] %s:%d " format "\n", __FILE__, \ -// __LINE__ __VA_OPT__(, ) __VA_ARGS__); \ -// }*/ -#define LOGE(...) \ +#define LOGE(format, ...) \ + { \ + fprintf( \ + stderr, "[ASSERT] %s:%d " format "\n", __FILE__, \ + __LINE__ __VA_OPT__(, ) __VA_ARGS__); \ + } +/*#define LOGE(...) \ { \ fprintf(stderr, "[ASSERT] %s:%d ", __FILE__, __LINE__); \ fprintf(stderr, __VA_ARGS__); \ fprintf(stderr, "\n"); \ - } + }*/ #endif // LOGE #define TRAP() raise(SIGTRAP) -- cgit v1.2.3