summaryrefslogtreecommitdiffstats
path: root/omni/assert.h
diff options
context:
space:
mode:
authorFabrice <fabrice@schaub-dev.xyz>2026-04-16 18:31:23 +0200
committerFabrice <fabrice@schaub-dev.xyz>2026-04-16 18:31:23 +0200
commitf8db0a0820b30aec21942d29bba26af47e1c7c68 (patch)
treec13e99b4ba8b6322a2b39b6940b22021e877c6d6 /omni/assert.h
parent4748386b4e22a5bfe0c4d3f0d65c43f37e09536e (diff)
Diffstat (limited to 'omni/assert.h')
-rw-r--r--omni/assert.h29
1 files changed, 0 insertions, 29 deletions
diff --git a/omni/assert.h b/omni/assert.h
deleted file mode 100644
index f3e865b..0000000
--- a/omni/assert.h
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef OMNI_ASSERT_H
-#define OMNI_ASSERT_H
-
-#include <cstdio>
-#include <cstdlib>
-
-#include "stdint.h"
-
-template <typename... Args>
-[[noreturn]] void panic_impl(const char* file, u32 line, const char* fmt,
- Args arguments) {
- fprintf(stderr, "PANIC at %s:%d: ", file, line);
- fprintf(stderr, fmt, args...);
- fputs("\n", stderr);
- abort();
-}
-
-#define panic(...) panic_impl(__FILE__, __LINE__, __VA_ARGS__)
-
-#ifndef NDEBUG
-# define assert(cond) \
- do { \
- if (!(cond)) panic("assertion failed: %s", #cond); \
- } while (0);
-#else
-# define assert(cond) unused(cond)
-#endif
-
-#endif