Changed local var names in SDL assert macro.
authorRyan C. Gordon <icculus@icculus.org>
Mon, 28 Jul 2014 10:54:25 -0400
changeset 9019 23e35485dae3
parent 9017 91f06d15d7d1
child 9023 276802355854
Changed local var names in SDL assert macro. Otherwise, if someone added an assert to a function that has a variable named "state", the compiler might warn about shadowing a local.
include/SDL_assert.h
--- a/include/SDL_assert.h	Sun Jul 27 19:56:53 2014 -0700
+++ b/include/SDL_assert.h	Mon Jul 28 10:54:25 2014 -0400
@@ -141,16 +141,13 @@
 #define SDL_enabled_assert(condition) \
     do { \
         while ( !(condition) ) { \
-            static struct SDL_assert_data assert_data = { \
+            static struct SDL_assert_data sdl_assert_data = { \
                 0, 0, #condition, 0, 0, 0, 0 \
             }; \
-            const SDL_assert_state state = SDL_ReportAssertion(&assert_data, \
-                                                               SDL_FUNCTION, \
-                                                               SDL_FILE, \
-                                                               SDL_LINE); \
-            if (state == SDL_ASSERTION_RETRY) { \
+            const SDL_assert_state sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \
+            if (sdl_assert_state == SDL_ASSERTION_RETRY) { \
                 continue; /* go again. */ \
-            } else if (state == SDL_ASSERTION_BREAK) { \
+            } else if (sdl_assert_state == SDL_ASSERTION_BREAK) { \
                 SDL_TriggerBreakpoint(); \
             } \
             break; /* not retrying. */ \