mirror of https://github.com/encounter/SDL.git
Another attempt to make MSVC's /W4 warning level cooperate with SDL_assert.
Fixes Bugzilla #2733.
This commit is contained in:
parent
a4458a7002
commit
3e9c2e7512
|
@ -86,11 +86,9 @@ This also solves the problem of...
|
||||||
disable assertions.
|
disable assertions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER /* stupid /W4 warnings. */
|
/* "while (0,0)" fools Microsoft's compiler's /W4 warning level into thinking
|
||||||
#define SDL_NULL_WHILE_LOOP_CONDITION (-1 == __LINE__)
|
this condition isn't constant. And looks like an owl's face! */
|
||||||
#else
|
#define SDL_NULL_WHILE_LOOP_CONDITION (0,0)
|
||||||
#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