include/SDL_assert.h
changeset 3653 1cd9f7117b98
parent 3652 dbd6a29e4b77
child 3654 336f3df1578d
equal deleted inserted replaced
3652:dbd6a29e4b77 3653:1cd9f7117b98
    23 
    23 
    24 #ifndef _SDL_assert_h
    24 #ifndef _SDL_assert_h
    25 #define _SDL_assert_h
    25 #define _SDL_assert_h
    26 
    26 
    27 #ifndef SDL_ASSERT_LEVEL
    27 #ifndef SDL_ASSERT_LEVEL
    28 #define SDL_ASSERT_LEVEL SDL_DEFAULT_ASSERT_LEVEL
    28 #if defined(_DEBUG) || defined(DEBUG) || \
       
    29     (defined(__GNUC__) && !defined(__OPTIMIZE__))
       
    30 #define SDL_ASSERT_LEVEL 2
       
    31 #else
       
    32 #define SDL_ASSERT_LEVEL 1
    29 #endif
    33 #endif
       
    34 #endif /* SDL_ASSERT_LEVEL */
    30 
    35 
    31 /*
    36 /*
    32 sizeof (x) makes the compiler still parse the expression even without
    37 sizeof (x) makes the compiler still parse the expression even without
    33 assertions enabled, so the code is always checked at compile time, but
    38 assertions enabled, so the code is always checked at compile time, but
    34 doesn't actually generate code for it, so there are no side effects or
    39 doesn't actually generate code for it, so there are no side effects or