Use the default windows assert for VisualC

Update Scons
This commit is contained in:
Kester Maddock 2005-01-17 11:02:44 +00:00
parent c448aa60ca
commit b908cfcb07
2 changed files with 10 additions and 1 deletions

@ -4,7 +4,8 @@ Import ('library_env')
moto_env = library_env.Copy () 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_Matrix3x3.cpp',
'intern/MT_Matrix4x4.cpp', 'intern/MT_Matrix4x4.cpp',
'intern/MT_Plane3.cpp', 'intern/MT_Plane3.cpp',

@ -35,11 +35,13 @@
#ifdef MT_NDEBUG #ifdef MT_NDEBUG
#define MT_assert(predicate) ((void)0) #define MT_assert(predicate) ((void)0)
#define BREAKPOINT() ((void)0)
#else #else
#include <signal.h> #include <signal.h>
#include <stdlib.h> #include <stdlib.h>
#include <assert.h>
// BREAKPOINT() will cause a break into the debugger // BREAKPOINT() will cause a break into the debugger
#if defined(__i386) && defined(__GNUC__) #if defined(__i386) && defined(__GNUC__)
@ -62,6 +64,11 @@
#define BREAKPOINT() \ #define BREAKPOINT() \
abort(); abort();
#endif #endif
#if defined(WIN32) && !defined(__GNUC__)
#define MT_assert(predicate) assert(predicate)
#else
// So it can be used from C // So it can be used from C
#ifdef __cplusplus #ifdef __cplusplus
@ -85,6 +92,7 @@ MT_CDECL int MT_QueryAssert(char *file, int line, char *predicate, int *do_asser
BREAKPOINT(); \ BREAKPOINT(); \
} \ } \
} }
#endif /* windows */
#endif /* MT_NDEBUG */ #endif /* MT_NDEBUG */