Automatically figure out the appropriate assertion level
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404404
This commit is contained in:
parent
34ddeb3501
commit
34ea846ca1
1 changed files with 6 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue