summaryrefslogtreecommitdiff
path: root/journal.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-08-29 03:23:55 -0400
committerJohn Wiegley <johnw@newartisans.com>2004-08-29 03:23:55 -0400
commit032afa5657bd600476cde256b6d7db84fde7d038 (patch)
tree3d9839f92ce2f99fda85583388dd258f376fdbbb /journal.cc
parent3034529d54759f0fd3bcc6191f33a5e93a1988ca (diff)
downloadfork-ledger-032afa5657bd600476cde256b6d7db84fde7d038.tar.gz
fork-ledger-032afa5657bd600476cde256b6d7db84fde7d038.tar.bz2
fork-ledger-032afa5657bd600476cde256b6d7db84fde7d038.zip
a bit of a reorg; still much more to go
Diffstat (limited to 'journal.cc')
-rw-r--r--journal.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/journal.cc b/journal.cc
index 5922cd34..30d258f1 100644
--- a/journal.cc
+++ b/journal.cc
@@ -139,8 +139,12 @@ account_t * account_t::find_account(const std::string& name,
if (i == accounts.end()) {
if (! auto_create)
return NULL;
+
account = new account_t(this, first);
- accounts.insert(accounts_pair(first, account));
+
+ std::pair<accounts_map::iterator, bool> result
+ = accounts.insert(accounts_pair(first, account));
+ assert(result.second);
} else {
account = (*i).second;
}