mirror of
https://github.com/yawut/SDL.git
synced 2026-08-01 07:53:54 -05:00
Automatically figure out the appropriate assertion level
This commit is contained in:
parent
8e978babaa
commit
0db463843f
|
|
@ -25,8 +25,13 @@
|
|||
#define _SDL_assert_h
|
||||
|
||||
#ifndef SDL_ASSERT_LEVEL
|
||||
#define SDL_ASSERT_LEVEL SDL_DEFAULT_ASSERT_LEVEL
|
||||
#if defined(_DEBUG) || defined(DEBUG) || \
|
||||
(defined(__GNUC__) && !defined(__OPTIMIZE__))
|
||||
#define SDL_ASSERT_LEVEL 2
|
||||
#else
|
||||
#define SDL_ASSERT_LEVEL 1
|
||||
#endif
|
||||
#endif /* SDL_ASSERT_LEVEL */
|
||||
|
||||
/*
|
||||
sizeof (x) makes the compiler still parse the expression even without
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user