# HG changeset patch # User Sam Lantinga # Date 1263369173 0 # Node ID 1cd9f7117b98e8732c5a25d6cedce2c7e71b7ec8 # Parent dbd6a29e4b7725fcd201bc1555f33bba57552d9c Automatically figure out the appropriate assertion level diff -r dbd6a29e4b77 -r 1cd9f7117b98 include/SDL_assert.h --- a/include/SDL_assert.h Wed Jan 13 07:36:00 2010 +0000 +++ b/include/SDL_assert.h Wed Jan 13 07:52:53 2010 +0000 @@ -25,8 +25,13 @@ #define _SDL_assert_h #ifndef SDL_ASSERT_LEVEL -#define SDL_ASSERT_LEVEL SDL_DEFAULT_ASSERT_LEVEL +#if defined(_DEBUG) || defined(DEBUG) || \ + (defined(__GNUC__) && !defined(__OPTIMIZE__)) +#define SDL_ASSERT_LEVEL 2 +#else +#define SDL_ASSERT_LEVEL 1 #endif +#endif /* SDL_ASSERT_LEVEL */ /* sizeof (x) makes the compiler still parse the expression even without