diff options
author | nyamatongwe <devnull@localhost> | 2000-10-03 11:31:47 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2000-10-03 11:31:47 +0000 |
commit | 036b89d5335618318ea2ad575d397b5e146ae2d9 (patch) | |
tree | 815fb27f2ecc79464f6cc75a56789d3a43babe3e /include/Platform.h | |
parent | bf47b7f563c0eca28b8555c0b6bdfcfe70a659ac (diff) | |
download | scintilla-mirror-036b89d5335618318ea2ad575d397b5e146ae2d9.tar.gz |
Added PLATFORM_ASSERT which is a verson of the standard assert which
can be directed wither to debug output or message boxes on Windows.
Diffstat (limited to 'include/Platform.h')
-rw-r--r-- | include/Platform.h | 8 |
1 files changed, 8 insertions, 0 deletions
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<short>(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 |