From a67e810e17bcb5db90f2f0f53b90533c23cee8ed Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 3 Oct 2000 11:31:47 +0000 Subject: Added PLATFORM_ASSERT which is a verson of the standard assert which can be directed wither to debug output or message boxes on Windows. --- include/Platform.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/Platform.h') diff --git a/include/Platform.h b/include/Platform.h index de9cf202a..afcc4f61c 100644 --- a/include/Platform.h +++ b/include/Platform.h @@ -405,7 +405,15 @@ public: return static_cast(x & 0xffff); } static void DebugPrintf(const char *format, ...); + static void ShowAssertionPopUps(bool assertionPopUps_); + static void Assert(const char *c, const char *file, int line); static int Clamp(int val, int minVal, int maxVal); }; +#ifdef NDEBUG +#define PLATFORM_ASSERT(c) ((void)0) +#else +#define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Platform::Assert(#c, __FILE__, __LINE__)) +#endif + #endif -- cgit v1.2.3