Automatically figure out the appropriate assertion level

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404404
This commit is contained in:
Sam Lantinga 2010-01-13 07:52:53 +00:00
parent 34ddeb3501
commit 34ea846ca1

View File

@ -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