From 00726871fa0861a4eb8ed57110c61763e1076b91 Mon Sep 17 00:00:00 2001 From: onelin Date: Sun, 30 Nov 2025 01:24:13 +0100 Subject: Split UNIMPLEMENTED implementation dependent on build type --- src/include/daw/logging.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/include/daw/logging.h b/src/include/daw/logging.h index 59342fe..ec4674e 100644 --- a/src/include/daw/logging.h +++ b/src/include/daw/logging.h @@ -5,11 +5,8 @@ extern "C" { #endif -#include #include #include -#include -#include #include @@ -48,14 +45,15 @@ void ERROR(const char* fmt, ...); void __DEBUG(const char* file, const i32 line, const char* func, const char* fmt, ...); -#define ASSERT(cond) if (!(cond)) { ERROR("ASSERTION FAILED! " #cond); __asm__("int3;"); } +#define UNIMPLEMENTED { DEBUG("%s is not implemented yet!", __func__); __asm__("int3;"); } do {} while (false) + +#define ASSERT(cond) if (!(cond)) { ERROR("ASSERTION FAILED! " #cond); __asm__("int3;"); } do {} while (false) #else #define DEBUG(...) #define ASSERT(...) +#define UNIMPLEMENTED { DEBUG("%s is not implemented yet!", __func__); exit(EXIT_FAILURE); } do {} while (false) #endif -#define UNIMPLEMENTED DEBUG("%s is not implemented yet!", __func__); exit(EXIT_FAILURE) - #ifdef __cplusplus } #endif -- cgit v1.3