Debug assert should fire on failure, not success!
This commit is contained in:
+2
-2
@@ -145,8 +145,8 @@ void ShowWarningOrTrace( const char *file, int line, const char *message, bool b
|
||||
#ifdef DEBUG
|
||||
// No reason to kill the program. A lot of these don't produce a crash in NDEBUG so why stop?
|
||||
// TODO: These should have something you can hook a breakpoint on.
|
||||
#define DEBUG_ASSERT(x) if(unlikely(x)) WARN("Debug assert failed")
|
||||
#define DEBUG_ASSERT_M(x,y) if(unlikely(x)) WARN(y)
|
||||
#define DEBUG_ASSERT_M(COND,MESSAGE) if(unlikely(!(COND))) WARN(MESSAGE)
|
||||
#define DEBUG_ASSERT(COND) DEBUG_ASSERT_M(COND,"Debug assert failed")
|
||||
#else
|
||||
/** @brief A dummy define to keep things going smoothly. */
|
||||
#define DEBUG_ASSERT(x)
|
||||
|
||||
Reference in New Issue
Block a user