Add a simple DEBUG_ONLY convenience macro

This commit is contained in:
Danny Robson 2012-05-03 18:11:17 +10:00
parent b7b47ed27e
commit 946d4d1eb0

View File

@ -28,6 +28,14 @@
#include <iostream>
#include <sstream>
#ifdef ENABLE_DEBUGGING
#define DEBUG_ONLY(X) \
do { \
X; \
} while (0)
#else
#define DEBUG_ONLY(X)
#endif
#define trace { \
std::cerr << __FILE__ << ":" << __func__ << ":" << __LINE__ << std::endl; \