From 0b616909e3472a4360e22d6b01749ee44092e967 Mon Sep 17 00:00:00 2001 From: faketruth Date: Sun, 19 Feb 2012 23:00:00 +0000 Subject: Using own ASSERT() that logs to file git-svn-id: http://mc-server.googlecode.com/svn/trunk@297 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Globals.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'source/Globals.h') diff --git a/source/Globals.h b/source/Globals.h index 1ede57bd4..c2aa3753c 100644 --- a/source/Globals.h +++ b/source/Globals.h @@ -75,13 +75,6 @@ -// Compatibility: -#define ASSERT assert - - - - - // STL stuff: #include #include @@ -127,6 +120,7 @@ /// Faster than (int)floorf((float)x / (float)div) #define FAST_FLOOR_DIV( x, div ) ( (x) < 0 ? (((int)x / div) - 1) : ((int)x / div) ) +#define ASSERT( x ) { if( !(x) ) { LOGERROR("Assertion failed: \"%s\", file %s, line %i", #x, __FILE__, __LINE__ ); assert( !#x ); } } -- cgit v1.2.3