Changed all ASSERTS_ON -> !NO_ASSERTS
This commit is contained in:
parent
1b1c7cd4ac
commit
2345f48094
3 changed files with 5 additions and 8 deletions
|
|
@ -900,7 +900,7 @@ void amount_t::annotate(const annotation_t& details)
|
||||||
if (commodity_t * ann_comm =
|
if (commodity_t * ann_comm =
|
||||||
this_base->pool().find_or_create(*this_base, details))
|
this_base->pool().find_or_create(*this_base, details))
|
||||||
set_commodity(*ann_comm);
|
set_commodity(*ann_comm);
|
||||||
#ifdef ASSERTS_ON
|
#if !NO_ASSERTS
|
||||||
else
|
else
|
||||||
assert(false);
|
assert(false);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
* Assertions
|
* Assertions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if ASSERTS_ON
|
#if !NO_ASSERTS
|
||||||
|
|
||||||
namespace ledger {
|
namespace ledger {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -103,10 +103,7 @@ namespace ledger {
|
||||||
#undef assert
|
#undef assert
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ! NO_ASSERTS
|
#if !NO_ASSERTS
|
||||||
#define ASSERTS_ON 1
|
|
||||||
#endif
|
|
||||||
#if ASSERTS_ON
|
|
||||||
|
|
||||||
namespace ledger {
|
namespace ledger {
|
||||||
void debug_assert(const string& reason, const string& func,
|
void debug_assert(const string& reason, const string& func,
|
||||||
|
|
@ -117,11 +114,11 @@ namespace ledger {
|
||||||
((x) ? ((void)0) : debug_assert(#x, BOOST_CURRENT_FUNCTION, \
|
((x) ? ((void)0) : debug_assert(#x, BOOST_CURRENT_FUNCTION, \
|
||||||
__FILE__, __LINE__))
|
__FILE__, __LINE__))
|
||||||
|
|
||||||
#else // ! ASSERTS_ON
|
#else // !NO_ASSERTS
|
||||||
|
|
||||||
#define assert(x)
|
#define assert(x)
|
||||||
|
|
||||||
#endif // ASSERTS_ON
|
#endif // !NO_ASSERTS
|
||||||
|
|
||||||
/*@}*/
|
/*@}*/
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue