include/SDL_assert.h
changeset 9019 23e35485dae3
parent 8833 ae720d61d14d
child 9371 375799828431
     1.1 --- a/include/SDL_assert.h	Sun Jul 27 19:56:53 2014 -0700
     1.2 +++ b/include/SDL_assert.h	Mon Jul 28 10:54:25 2014 -0400
     1.3 @@ -141,16 +141,13 @@
     1.4  #define SDL_enabled_assert(condition) \
     1.5      do { \
     1.6          while ( !(condition) ) { \
     1.7 -            static struct SDL_assert_data assert_data = { \
     1.8 +            static struct SDL_assert_data sdl_assert_data = { \
     1.9                  0, 0, #condition, 0, 0, 0, 0 \
    1.10              }; \
    1.11 -            const SDL_assert_state state = SDL_ReportAssertion(&assert_data, \
    1.12 -                                                               SDL_FUNCTION, \
    1.13 -                                                               SDL_FILE, \
    1.14 -                                                               SDL_LINE); \
    1.15 -            if (state == SDL_ASSERTION_RETRY) { \
    1.16 +            const SDL_assert_state sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \
    1.17 +            if (sdl_assert_state == SDL_ASSERTION_RETRY) { \
    1.18                  continue; /* go again. */ \
    1.19 -            } else if (state == SDL_ASSERTION_BREAK) { \
    1.20 +            } else if (sdl_assert_state == SDL_ASSERTION_BREAK) { \
    1.21                  SDL_TriggerBreakpoint(); \
    1.22              } \
    1.23              break; /* not retrying. */ \