aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authornyamatongwe <unknown>2000-10-03 11:31:47 +0000
committernyamatongwe <unknown>2000-10-03 11:31:47 +0000
commita67e810e17bcb5db90f2f0f53b90533c23cee8ed (patch)
tree815fb27f2ecc79464f6cc75a56789d3a43babe3e /include
parent57e0eed5ab57d6e2607a41a33336e26cd7f11202 (diff)
downloadscintilla-mirror-a67e810e17bcb5db90f2f0f53b90533c23cee8ed.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')
-rw-r--r--include/Platform.h8
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