|
@@ -34,15 +34,16 @@ private:
|
|
|
//---------------------------------------------------------------------------
|
|
|
#include <assert.h>
|
|
|
#define ACCESS_VIOLATION_TEST { (*((int*)NULL)) = 0; }
|
|
|
-#ifndef _DEBUG
|
|
|
-#undef DebugAssert
|
|
|
+#if !defined(_DEBUG) || defined(DESIGN_ONLY)
|
|
|
#define DebugAssert(p) ((void)0)
|
|
|
#define DebugCheck(p) p
|
|
|
#define DebugFail
|
|
|
-#else // ifndef _DEBUG
|
|
|
+#else // if !defined(_DEBUG) || defined(DESIGN_ONLY)
|
|
|
+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 // ifndef _DEBUG
|
|
|
+#endif // if !defined(_DEBUG) || defined(DESIGN_ONLY)
|
|
|
//---------------------------------------------------------------------------
|
|
|
#define DebugAlwaysTrue(p) (p)
|
|
|
#define DebugAlwaysFalse(p) (p)
|