comparison code_part1/OSTC_code_c_part2/p2_definitions.h @ 235:ade0848c8b8b

New runtime asserts when compiled in DEBUG more. When __DEBUG is defined, the assert() calls are checked, and PLED_resetdebugger is called when the condition fails.
author JeanDo
date Sat, 19 Mar 2011 11:34:32 +0100
parents 638f8e17bd51
children a99073445c18
comparison
equal deleted inserted replaced
234:bb8940caebe1 235:ade0848c8b8b
110 110
111 // Avoid warnings about float/double mismatches: 111 // Avoid warnings about float/double mismatches:
112 # pragma warning(disable: 4244 4068 4305) 112 # pragma warning(disable: 4244 4068 4305)
113 #else 113 #else
114 # define PARAMETER static 114 # define PARAMETER static
115 # define assert(predicate) 115 # ifdef __DEBUG
116 # define assert(predicate) if( !(predicate) ) assert_failed(__LINE__)
117 # else
118 # define assert(predicate)
119 # endif
116 #endif 120 #endif
117 121
118 ////////////////////////////////////////////////////////////////////////////// 122 //////////////////////////////////////////////////////////////////////////////