|
|
@@ -38,16 +38,19 @@ private:
|
|
|
//---------------------------------------------------------------------------
|
|
|
#include <assert.h>
|
|
|
#define ACCESS_VIOLATION_TEST { (*((int*)NULL)) = 0; }
|
|
|
-#if !defined(_DEBUG) || defined(DESIGN_ONLY)
|
|
|
+#if defined(_DEBUG) && !defined(DESIGN_ONLY)
|
|
|
+#define DODEBUGGING
|
|
|
+#endif
|
|
|
+#ifndef DODEBUGGING
|
|
|
#define DebugAssert(p) ((void)0)
|
|
|
#define DebugCheck(p) (p)
|
|
|
#define DebugFail()
|
|
|
-#else // if !defined(_DEBUG) || defined(DESIGN_ONLY)
|
|
|
+#else // ifndef DODEBUGGING
|
|
|
void __fastcall DoAssert(wchar_t * Message, wchar_t * Filename, int LineNumber);
|
|
|
#define DebugAssert(p) ((p) ? (void)0 : DoAssert(TEXT(#p), TEXT(__FILE__), __LINE__))
|
|
|
#define DebugCheck(p) { bool __CHECK_RESULT__ = (p); DebugAssert(__CHECK_RESULT__); }
|
|
|
#define DebugFail() DebugAssert(false)
|
|
|
-#endif // if !defined(_DEBUG) || defined(DESIGN_ONLY)
|
|
|
+#endif // ifndef DODEBUGGING
|
|
|
//---------------------------------------------------------------------------
|
|
|
#define DebugAlwaysTrue(p) (p)
|
|
|
#define DebugAlwaysFalse(p) (p)
|