Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Automatically figure out the appropriate assertion level
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jan 13, 2010
1 parent c9ccfff commit b2830b6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion include/SDL_assert.h
Expand Up @@ -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
Expand Down

0 comments on commit b2830b6

Please sign in to comment.