From ab86cd8c3743ba5ae5c2ef2f7e20c51b870bb7e5 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 25 Aug 2004 17:34:23 -0400 Subject: added asserts to, and proof-read, amount.cc --- ledger.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ledger.cc') diff --git a/ledger.cc b/ledger.cc index 66fbe9c7..d2a3bf15 100644 --- a/ledger.cc +++ b/ledger.cc @@ -253,6 +253,12 @@ bool journal_t::valid() const if (! (*i)->valid()) return false; + for (commodities_map::const_iterator i = commodity_t::commodities.begin(); + i != commodity_t::commodities.end(); + i++) + if (! (*i).second->valid()) + return false; + return true; } -- cgit v1.2.3