#if defined ( _DEBUG ) || defined ( DEBUG ) #define ASSERT(expr) { if ( !(expr) ) { __ASM__(" bkpt #0"); } } #else #define ASSERT(...) { } #endif
Usage:
void someFunc(int inputParam) { ASSERT( inputParam < 5 ); ///< execution will stop here if inputParam >= 5 ... }
No comments:
Post a Comment