Sometimes a local variable is used for the sole purpose of checking it in an assert(), like so -
int Result = Func(); assert( Result == 1 );
I'd use the following:
#ifdef _DEBUG #define ASSERT(FUNC, CHECK) assert(FUNC == CHECK) #else #define ASSERT(FUNC, CHECK) #endif ... ASSERT(Func(), 1);
This way, for release build, the compiler don't even need to produce any code for assert.