Define macro for debug-only code
This commit is contained in:
parent
f3077ef8e3
commit
4fcc8442f8
|
@ -441,9 +441,7 @@ void ArgumentParser::verifySetup() const
|
|||
void ArgumentParser::parseArgs(int argc, char *argv[])
|
||||
{
|
||||
// initiate parser
|
||||
#ifdef DEBUG_BUILD
|
||||
verifySetup();
|
||||
#endif
|
||||
IF_DEBUG_BUILD(verifySetup();)
|
||||
m_actualArgc = 0; // reset actual agument count
|
||||
unsigned int actualArgc = 0;
|
||||
int valuesToRead = 0;
|
||||
|
|
|
@ -82,4 +82,15 @@
|
|||
|
||||
#define VAR_UNUSED(x) (void)x;
|
||||
|
||||
/*!
|
||||
* \def IF_DEBUG_BUILD
|
||||
* \brief Wraps debug-only lines conveniently.
|
||||
*/
|
||||
|
||||
#ifdef DEBUG_BUILD
|
||||
# define IF_DEBUG_BUILD(x) x
|
||||
#else
|
||||
# define IF_DEBUG_BUILD(x)
|
||||
#endif
|
||||
|
||||
#endif // MARTCHUSUTILITY_LIBRARY_GLOBAL_H
|
||||
|
|
Loading…
Reference in New Issue