Use the default windows assert for VisualC
authorKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>
Mon, 17 Jan 2005 11:02:44 +0000 (11:02 +0000)
committerKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>
Mon, 17 Jan 2005 11:02:44 +0000 (11:02 +0000)
Update Scons

intern/moto/SConscript
intern/moto/include/MT_assert.h

index 04bd97abc82e857bd57d854c0f2a4afad15bf190..b0956c15dd2e29affdf9e5a319736e0fd2823a55 100644 (file)
@@ -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',
index dce57b91272a394a2ee1d3a9d64ef75ebf91cb9e..b454461d186dc31e2d07d09441469b10895d8e88 100644 (file)
 #ifdef MT_NDEBUG
 
 #define MT_assert(predicate) ((void)0)
+#define BREAKPOINT() ((void)0)
 
 #else 
 
 #include <signal.h>
 #include <stdlib.h>
+#include <assert.h>
 
 // BREAKPOINT() will cause a break into the debugger
 #if defined(__i386) && defined(__GNUC__)
 #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 */