diff options
author | RALOVICH, Kristof <tade60@freemail.hu> | 2015-08-17 14:01:31 +0200 |
---|---|---|
committer | RALOVICH, Kristof <tade60@freemail.hu> | 2015-08-17 14:01:31 +0200 |
commit | da598a19ef1526c6a137939b5a7cc0e52fe75bcc (patch) | |
tree | 0cdfb229533aa68a272d23e28e5443d327a76ffc | |
parent | 1766eec458668f29324b13aac38f3166aa5dc15b (diff) |
add ASSURE_EQ_RET_FALSE macro
-rw-r--r-- | src/common.hpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common.hpp b/src/common.hpp index 38820c0..f3a6200 100644 --- a/src/common.hpp +++ b/src/common.hpp @@ -40,6 +40,8 @@ namespace antpm { #define LOG_VAR5(x,y, z, w,v) do { LOG(antpm::LOG_INF) << #x "= " << x << ", " #y "= " << y << ", " #z "= " << z << ", " #w "= " << w << ", " #v "= " << v << std::endl; } while(0) #define UNUSED(x) (void)(x) +#define ASSURE_EQ_RET_FALSE(a,b) do { if(!((a)==(b))) { lprintf(antpm::LOG_ERR, "%s!=%s\n", #a, #b); LOG(antpm::LOG_ERR) << (char*)(#a) << "=" << a << ", " << (char*)(#b) << "=" << b << std::endl; return false; } } while(0) + //std::ostream& logger(); #define logger() LOG(antpm::LOG_INF) //FILE* loggerc(); |