summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-05-20 15:25:10 -0500
committerJohn Wiegley <johnw@newartisans.com>2012-05-20 15:25:10 -0500
commit2345f48094a71b2611fc48452f9076ba1506e241 (patch)
tree0af2c8821f8463d654b01834d8b8bd95e9373a68
parent1b1c7cd4ac9efe9f44b31513a33dc68bf6ee1924 (diff)
downloadfork-ledger-2345f48094a71b2611fc48452f9076ba1506e241.tar.gz
fork-ledger-2345f48094a71b2611fc48452f9076ba1506e241.tar.bz2
fork-ledger-2345f48094a71b2611fc48452f9076ba1506e241.zip
Changed all ASSERTS_ON -> !NO_ASSERTS
-rw-r--r--src/amount.cc2
-rw-r--r--src/utils.cc2
-rw-r--r--src/utils.h9
3 files changed, 5 insertions, 8 deletions
diff --git a/src/amount.cc b/src/amount.cc
index 9491efcd..6ecb3558 100644
--- a/src/amount.cc
+++ b/src/amount.cc
@@ -900,7 +900,7 @@ void amount_t::annotate(const annotation_t& details)
if (commodity_t * ann_comm =
this_base->pool().find_or_create(*this_base, details))
set_commodity(*ann_comm);
-#ifdef ASSERTS_ON
+#if !NO_ASSERTS
else
assert(false);
#endif
diff --git a/src/utils.cc b/src/utils.cc
index c8f44124..1a82787d 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -38,7 +38,7 @@
* Assertions
*/
-#if ASSERTS_ON
+#if !NO_ASSERTS
namespace ledger {
diff --git a/src/utils.h b/src/utils.h
index 0a3afc4d..63b98029 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -103,10 +103,7 @@ namespace ledger {
#undef assert
#endif
-#if ! NO_ASSERTS
-#define ASSERTS_ON 1
-#endif
-#if ASSERTS_ON
+#if !NO_ASSERTS
namespace ledger {
void debug_assert(const string& reason, const string& func,
@@ -117,11 +114,11 @@ namespace ledger {
((x) ? ((void)0) : debug_assert(#x, BOOST_CURRENT_FUNCTION, \
__FILE__, __LINE__))
-#else // ! ASSERTS_ON
+#else // !NO_ASSERTS
#define assert(x)
-#endif // ASSERTS_ON
+#endif // !NO_ASSERTS
/*@}*/