From b908cfcb07ca28b099953d5a1ddad9a5e1cc85c4 Mon Sep 17 00:00:00 2001 From: Kester Maddock Date: Mon, 17 Jan 2005 11:02:44 +0000 Subject: Use the default windows assert for VisualC Update Scons --- intern/moto/SConscript | 3 ++- intern/moto/include/MT_assert.h | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'intern') diff --git a/intern/moto/SConscript b/intern/moto/SConscript index 04bd97abc82..b0956c15dd2 100644 --- a/intern/moto/SConscript +++ b/intern/moto/SConscript @@ -4,7 +4,8 @@ Import ('library_env') moto_env = library_env.Copy () -source_files = ['intern/MT_CmMatrix4x4.cpp', +source_files = ['intern/MT_Assert.cpp', + 'intern/MT_CmMatrix4x4.cpp', 'intern/MT_Matrix3x3.cpp', 'intern/MT_Matrix4x4.cpp', 'intern/MT_Plane3.cpp', diff --git a/intern/moto/include/MT_assert.h b/intern/moto/include/MT_assert.h index dce57b91272..b454461d186 100644 --- a/intern/moto/include/MT_assert.h +++ b/intern/moto/include/MT_assert.h @@ -35,11 +35,13 @@ #ifdef MT_NDEBUG #define MT_assert(predicate) ((void)0) +#define BREAKPOINT() ((void)0) #else #include #include +#include // BREAKPOINT() will cause a break into the debugger #if defined(__i386) && defined(__GNUC__) @@ -62,6 +64,11 @@ #define BREAKPOINT() \ abort(); #endif + + +#if defined(WIN32) && !defined(__GNUC__) +#define MT_assert(predicate) assert(predicate) +#else // So it can be used from C #ifdef __cplusplus @@ -85,6 +92,7 @@ MT_CDECL int MT_QueryAssert(char *file, int line, char *predicate, int *do_asser BREAKPOINT(); \ } \ } +#endif /* windows */ #endif /* MT_NDEBUG */ -- cgit v1.2.3