Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion error_sdr/error_sdr.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,26 @@ typedef struct TEXT_MESSAGE
* Checks condition, if false calls error_fail_fast with error *
* *
*******************************************************************************/
#define assert_fail_fast( condition, error ) if ( !condition ) error_fail_fast( error )
#define assert_fail_fast( condition, error ) do { if ( !(condition) ) error_fail_fast( error ); } while(0)


/*******************************************************************************
* *
* MACRO: *
* debug_assert *
* *
* DESCRIPTION: *
* Checks condition, if false calls error_fail_fast with error. Debug *
* builds only -- release builds will do nothing. *
* *
*******************************************************************************/
#if defined(DEBUG) || !defined(RELBLD)
#define debug_assert( condition, error ) \
do { if ( !(condition) ) error_fail_fast( error ); } while(0)
#else
#define debug_assert( condition, error ) \
do { } while(0)
#endif


/*------------------------------------------------------------------------------
Expand Down