Disable CHECK calls when not debugging

This commit is contained in:
Danny Robson 2012-05-15 16:05:27 +10:00
parent 0c86a8b240
commit 76ffb05c23

View File

@ -83,8 +83,15 @@
} while (0)
#define CHECK_HARD(C) _CHECK_META((C), { ; }, { panic (); })
#define CHECK_SOFT(C) _CHECK_META((C), { ; }, { breakpoint (); })
#if defined(ENABLE_DEBUGGING)
#define CHECK_HARD(C) _CHECK_META((C), { ; }, { panic (); })
#define CHECK_SOFT(C) _CHECK_META((C), { ; }, { breakpoint (); })
#define CHECK(C) CHECK_HARD(C)
#else
#define CHECK_HARD(C) { };
#define CHECK_SOFT(C) { };
#define CHECK(C) CHECK_SOFT(C)
#endif
#define CHECK_EQ(A,B) do { \
@ -131,8 +138,6 @@
panic ("expected exception: " #E); \
} while (0)
#define CHECK(C) CHECK_HARD(C)
class panic_error {
protected: