summaryrefslogtreecommitdiff
path: root/src/account.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-01 21:14:05 -0500
committerJohn Wiegley <johnw@newartisans.com>2009-11-01 21:14:05 -0500
commit6b6ca6d4c70df0e4a3009ee093cf2f83ecee2675 (patch)
treed883948c90dd7d6dd096458a96c6b3e2b66b312a /src/account.cc
parent48f024a42aa02f36220cf5e06ed005c65cc3fa76 (diff)
downloadfork-ledger-6b6ca6d4c70df0e4a3009ee093cf2f83ecee2675.tar.gz
fork-ledger-6b6ca6d4c70df0e4a3009ee093cf2f83ecee2675.tar.bz2
fork-ledger-6b6ca6d4c70df0e4a3009ee093cf2f83ecee2675.zip
Improved the way account temporaries are managed
Diffstat (limited to 'src/account.cc')
-rw-r--r--src/account.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/account.cc b/src/account.cc
index 31d86bd2..b14520d3 100644
--- a/src/account.cc
+++ b/src/account.cc
@@ -42,10 +42,9 @@ account_t::~account_t()
{
TRACE_DTOR(account_t);
- foreach (accounts_map::value_type& pair, accounts) {
- assert(! pair.second->has_flags(ACCOUNT_TEMP));
- checked_delete(pair.second);
- }
+ foreach (accounts_map::value_type& pair, accounts)
+ if (! pair.second->has_flags(ACCOUNT_TEMP))
+ checked_delete(pair.second);
}
account_t * account_t::find_account(const string& name,