Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Automatically figure out the appropriate assertion level

  • Loading branch information
slouken committed Jan 13, 2010
1 parent c9ccfff commit b2830b6cc4a2ec5936232ba07298852d33cdb1cf
Showing with 6 additions and 1 deletion.
  1. +6 −1 include/SDL_assert.h
@@ -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

0 comments on commit b2830b6

Please sign in to comment.