add missing assert file

This commit is contained in:
Maximilian Keßler 2023-08-06 22:08:34 +02:00
parent 385ba6650b
commit d2e91d74d5
Signed by: max
GPG key ID: BCC5A619923C0BA5

11
myassert.h Normal file
View file

@ -0,0 +1,11 @@
#ifndef DYNAMIC_PROGRAM_MYASSERT_H
#define DYNAMIC_PROGRAM_MYASSERT_H
#ifdef NDEBUG
#define ASSERT(x) do { (void)sizeof(x);} while (0)
#else
#include <assert.h>
#define ASSERT(x) assert(x)
#endif
#endif //DYNAMIC_PROGRAM_MYASSERT_H