summaryrefslogtreecommitdiff
path: root/ledger.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2003-10-29 07:47:41 +0000
committerJohn Wiegley <johnw@newartisans.com>2003-10-29 07:47:41 +0000
commit8c5b124e9961d3ee64105e1576e79f304c18b40e (patch)
treefb7055327dedd10466f2fcfc4d8d1fdebcb6f7d2 /ledger.h
parent0d29133f8abee4cd24ca2eecce7f82be7534d5a9 (diff)
downloadfork-ledger-8c5b124e9961d3ee64105e1576e79f304c18b40e.tar.gz
fork-ledger-8c5b124e9961d3ee64105e1576e79f304c18b40e.tar.bz2
fork-ledger-8c5b124e9961d3ee64105e1576e79f304c18b40e.zip
changes
Diffstat (limited to 'ledger.h')
-rw-r--r--ledger.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/ledger.h b/ledger.h
index c63ce574..de30843e 100644
--- a/ledger.h
+++ b/ledger.h
@@ -1,5 +1,5 @@
#ifndef _LEDGER_H
-#define _LEDGER_H "$Revision: 1.27 $"
+#define _LEDGER_H "$Revision: 1.28 $"
//////////////////////////////////////////////////////////////////////
//
@@ -20,6 +20,9 @@
#ifdef DEBUG
#include <cassert>
#else
+#ifdef assert
+#undef assert
+#endif
#define assert(x)
#endif
@@ -297,9 +300,13 @@ inline commodity::commodity(const std::string& sym, bool pre, bool sep,
bool thou, bool euro, int prec)
: symbol(sym), price(NULL), prefix(pre), separate(sep),
thousands(thou), european(euro), precision(prec) {
+#ifdef DEBUG
std::pair<commodities_map_iterator, bool> result =
+#endif
main_ledger->commodities.insert(commodities_map_pair(sym, this));
+#ifdef DEBUG
assert(result.second);
+#endif
}
// Parsing routines