For debugging, I have many calls to the debug log function in my application. Of course, in the production version, these debugging calls must be skipped. Instead of writing:
#if DEVEL == 1 Log::debug(...); #endif
around all the calls to the debug function, I decided to write the following in the debug function itself:
#if DEVEL != 1 return;
Will there be an exception due to useless use of the function call by the compiler, or am I better off using the (many ugly) #if #endif construct for performance reasons?
source share