Change debug temporary names to reduce collisions

This commit is contained in:
Danny Robson 2011-08-29 14:32:30 +10:00
parent a4e6f67bc5
commit a30e0f4be0

View File

@ -34,28 +34,28 @@
#define verify_soft(C, COND) ({ \ #define verify_soft(C, COND) ({ \
const auto value = (C); \ const auto __DEBUG_value = (C); \
check_soft(value COND); \ check_soft(__DEBUG_value COND); \
value; \ __DEBUG_value; \
}) })
#define verify_hard(C, COND) ({ \ #define verify_hard(C, COND) ({ \
const auto value = (C); \ const auto __DEBUG_value = (C); \
check_hard(value COND); \ check_hard(__DEBUG_value COND); \
value; \ __DEBUG_value; \
}) })
#define _check_meta(C, SUCCESS, FAILURE) do { \ #define _check_meta(C, SUCCESS, FAILURE) do { \
const auto value = (C); \ const auto __DEBUG_value = (C); \
if (unlikely (!value)) { \ if (unlikely (!__DEBUG_value)) { \
std::cerr << PACKAGE << ": " \ std::cerr << PACKAGE << ": " \
<< __FILE__ << ":" \ << __FILE__ << ":" \
<< __LINE__ << ": " \ << __LINE__ << ": " \
<< __FUNCTION__ \ << __FUNCTION__ \
<< ". Assertion '" << #C \ << ". Assertion '" << #C \
<< "' failed with: " << value << std::endl; \ << "' failed: " << __DEBUG_value << std::endl; \
\ \
{ FAILURE } \ { FAILURE } \
} else { \ } else { \