From 2969a13de47c81bda0b35bcf9db2df45da9ea11e Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 3 Dec 2002 01:26:36 +0000 Subject: [PATCH] reenable assert checking --- stepmania/src/RageException.h | 16 ---------------- stepmania/src/StdAfx.h | 13 +++++++++++++ stepmania/src/StdString.h | 2 -- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/stepmania/src/RageException.h b/stepmania/src/RageException.h index 1fcb728270..42fd693206 100644 --- a/stepmania/src/RageException.h +++ b/stepmania/src/RageException.h @@ -26,20 +26,4 @@ protected: CString m_sError; }; -//#include "crash.h" - -/* Assertion that sets an optional message and brings up the crash handler, so - * we get a backtrace. This should probably be used instead of throwing an - * exception in most cases we expect never to happen (but not in cases that - * we do expect, such as d3d init failure.) */ -//#define RAGE_ASSERT_M(COND, MESSAGE) { if(!(COND)) { VDCHECKPOINT_M(MESSAGE); *(char*)0=0; } } -//#define RAGE_ASSERT(COND) RAGE_ASSERT_M((COND), "Assertion failure") - -/* Make this the default assert handler. */ -#ifdef ASSERT -#undef ASSERT -#endif -#define ASSERT(x) ; - - #endif diff --git a/stepmania/src/StdAfx.h b/stepmania/src/StdAfx.h index 8263544c60..8db601a1ca 100644 --- a/stepmania/src/StdAfx.h +++ b/stepmania/src/StdAfx.h @@ -46,6 +46,19 @@ using namespace std; +/* Assertion that sets an optional message and brings up the crash handler, so + * we get a backtrace. This should probably be used instead of throwing an + * exception in most cases we expect never to happen (but not in cases that + * we do expect, such as d3d init failure.) */ +#include "crash.h" +#define RAGE_ASSERT_M(COND, MESSAGE) { if(!(COND)) { VDCHECKPOINT_M(MESSAGE); *(char*)0=0; } } +#define RAGE_ASSERT(COND) RAGE_ASSERT_M((COND), "Assertion failure") + +/* Make this the default assert handler. */ +#ifdef ASSERT +#undef ASSERT +#endif +#define ASSERT RAGE_ASSERT #if 1 diff --git a/stepmania/src/StdString.h b/stepmania/src/StdString.h index db99029cdf..db289ab23b 100644 --- a/stepmania/src/StdString.h +++ b/stepmania/src/StdString.h @@ -369,8 +369,6 @@ inline const Type& SSMAX(const Type& arg1, const Type& arg2) #endif #endif // #ifndef W32BASE_H -#undef ASSERT -#define ASSERT(x) ; // Standard headers needed