diff include/SDL_assert.h @ 3649:1e74d7984d0b

The config sets the default assertion level so people can override it for their own use in application code.
author Sam Lantinga <slouken@libsdl.org>
date Wed, 13 Jan 2010 07:25:28 +0000
parents c5925cd41955
children 91460fdfe83a
line wrap: on
line diff
--- a/include/SDL_assert.h	Wed Jan 13 07:00:20 2010 +0000
+++ b/include/SDL_assert.h	Wed Jan 13 07:25:28 2010 +0000
@@ -21,13 +21,11 @@
 */
 #include "SDL_config.h"
 
-/* This is an assert macro for SDL's internal use. Not for the public API! */
-
 #ifndef _SDL_assert_h
 #define _SDL_assert_h
 
 #ifndef SDL_ASSERT_LEVEL
-#error SDL_ASSERT_LEVEL is not defined. Please fix your SDL_config.h.
+#define SDL_ASSERT_LEVEL SDL_DEFAULT_ASSERT_LEVEL
 #endif
 
 /*
@@ -107,12 +105,12 @@
 #define SDL_enabled_assert(condition) \
     do { \
         while ( !(condition) ) { \
-			static struct SDL_assert_data assert_data = { \
+            static struct SDL_assert_data assert_data = { \
                 0, 0, #condition, __FILE__, 0, 0, 0 \
             }; \
-			const SDL_assert_state state = SDL_ReportAssertion(&assert_data, \
+            const SDL_assert_state state = SDL_ReportAssertion(&assert_data, \
                                                                SDL_FUNCTION, \
-															   __LINE__); \
+                                                               __LINE__); \
             if (state == SDL_ASSERTION_RETRY) { \
                 continue; /* go again. */ \
             } else if (state == SDL_ASSERTION_BREAK) { \
@@ -148,4 +146,3 @@
 #endif /* _SDL_assert_h */
 
 /* vi: set ts=4 sw=4 expandtab: */
-