From ea36f30a8e1993d4aacc8974cd0994db67902467 Mon Sep 17 00:00:00 2001 From: Clement Sibille Date: Mon, 26 Feb 2024 02:20:32 +0900 Subject: Initial commit --- lisiblepng/src/assert.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 lisiblepng/src/assert.h (limited to 'lisiblepng/src/assert.h') diff --git a/lisiblepng/src/assert.h b/lisiblepng/src/assert.h new file mode 100644 index 0000000..7d41b57 --- /dev/null +++ b/lisiblepng/src/assert.h @@ -0,0 +1,15 @@ +#ifndef LISIBLE_PNG_ASSET_H +#define LISIBLE_PNG_ASSET_H + +#include "log.h" + +#define ASSERT(predicate) \ + do { \ + if (!(predicate)) { \ + LOGN("Assertion failed in %s:%d:\n\t%s", __FILE__, __LINE__, \ + #predicate); \ + exit(1); \ + } \ + } while (0) + +#endif // LISIBLE_PNG_ASSET_H -- cgit v1.2.3