Add a warn macro

This commit is contained in:
Danny Robson 2012-01-04 17:03:00 +11:00
parent cdd1f60b0d
commit e2b56f3b77

View File

@ -33,6 +33,11 @@
}
#define warn(MSG) do { \
std::cerr << __FILE__ << ":" << __func__ << ":" __LINE__ << ", " << (MSG) << std::endl; \
} while (0)
#define warn_if(C, MSG) do { \
if (C) { \
std::cerr << __FILE__ << ":" << __func__ << ":" __LINE__ << ", " << (MSG) << std::endl; \