summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/daw/logging.h10
1 files changed, 4 insertions, 6 deletions
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 <math.h>
#include <stdarg.h>
#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include <daw/types.h>
@@ -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