debug: change WARN to print condition as message

This commit is contained in:
Danny Robson 2015-01-15 14:05:43 +11:00
parent 0501d0a87a
commit 21725e9b99

View File

@ -47,14 +47,9 @@
}
#define WARN(MSG) do { \
std::cerr << __FILE__ << ":" << __func__ << ":" __LINE__ << ", " << (MSG) << std::endl; \
} while (0)
#define WARN_IF(C, MSG) do { \
#define WARN(C) do { \
if (C) { \
std::cerr << __FILE__ << ":" << __func__ << ":" __LINE__ << ", " << (MSG) << std::endl; \
std::cerr << __FILE__ << ":" << __func__ << ":" << __LINE__ << ", " << #C << std::endl; \
} \
} while (0)