Non-fatal todo messages only shown with _DEBUG

This commit is contained in:
Iliyas Jorio 2020-12-28 16:25:56 +01:00
parent 95fdba76bf
commit ca2d925c63

View File

@ -31,12 +31,15 @@ void ImplementMe(const char* fn, std::string msg, int severity);
ImplementMe(__func__, ss.str(), severity); \ ImplementMe(__func__, ss.str(), severity); \
} }
#define TODOFATAL() TODOCUSTOM("", 2)
#define TODOFATAL2(x) TODOCUSTOM(x, 2)
#if _DEBUG
#define TODOMINOR() TODOCUSTOM("", 0) #define TODOMINOR() TODOCUSTOM("", 0)
#define TODOMINOR2(x) TODOCUSTOM(x, 0) #define TODOMINOR2(x) TODOCUSTOM(x, 0)
#define TODO() TODOCUSTOM("", 1) #define TODO() TODOCUSTOM("", 1)
#define TODO2(x) TODOCUSTOM(x, 1) #define TODO2(x) TODOCUSTOM(x, 1)
#define TODOFATAL() TODOCUSTOM("", 2)
#define TODOFATAL2(x) TODOCUSTOM(x, 2)
#define ONCE(x) { \ #define ONCE(x) { \
static bool once = false; \ static bool once = false; \
@ -47,5 +50,14 @@ void ImplementMe(const char* fn, std::string msg, int severity);
} \ } \
} }
#else
#endif #define TODOMINOR() {}
#define TODOMINOR2(x) {}
#define TODO() {}
#define TODO2(x) {}
#define ONCE(x) {x}
#endif // _DEBUG
#endif // __cplusplus