mirror of https://github.com/encounter/SDL.git
Do the "fix" for asserts with MSVC's /W4 warnings only on MSVC.
Naturally, this way generates a warning on GCC and Clang instead. :)
This commit is contained in:
parent
9a686aaa56
commit
6a126a48df
|
@ -88,7 +88,11 @@ disable assertions.
|
||||||
|
|
||||||
/* "while (0,0)" fools Microsoft's compiler's /W4 warning level into thinking
|
/* "while (0,0)" fools Microsoft's compiler's /W4 warning level into thinking
|
||||||
this condition isn't constant. And looks like an owl's face! */
|
this condition isn't constant. And looks like an owl's face! */
|
||||||
|
#ifdef _MSC_VER /* stupid /W4 warnings. */
|
||||||
#define SDL_NULL_WHILE_LOOP_CONDITION (0,0)
|
#define SDL_NULL_WHILE_LOOP_CONDITION (0,0)
|
||||||
|
#else
|
||||||
|
#define SDL_NULL_WHILE_LOOP_CONDITION (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SDL_disabled_assert(condition) \
|
#define SDL_disabled_assert(condition) \
|
||||||
do { (void) sizeof ((condition)); } while (SDL_NULL_WHILE_LOOP_CONDITION)
|
do { (void) sizeof ((condition)); } while (SDL_NULL_WHILE_LOOP_CONDITION)
|
||||||
|
|
Loading…
Reference in New Issue