diff options
author | John Wiegley <johnw@newartisans.com> | 2005-07-22 23:02:18 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 02:41:16 -0400 |
commit | 5fb495858bd2fc3332def31a07e3c6d72e2d001e (patch) | |
tree | 605e5f79864e5ef1b7e4ff5f9cf3824be4e22c8f /walk.cc | |
parent | cf83c024d987e913648aa3e3953d80c50f0be3e7 (diff) | |
download | fork-ledger-5fb495858bd2fc3332def31a07e3c6d72e2d001e.tar.gz fork-ledger-5fb495858bd2fc3332def31a07e3c6d72e2d001e.tar.bz2 fork-ledger-5fb495858bd2fc3332def31a07e3c6d72e2d001e.zip |
(operator): Rearranged some code and added an assert.
Diffstat (limited to 'walk.cc')
-rw-r--r-- | walk.cc | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -109,10 +109,15 @@ void truncate_entries::flush() void set_account_value::operator()(transaction_t& xact) { - add_transaction_to(xact, account_xdata(*xact.account).value); - account_xdata_(*xact.account).count++; + account_t * acct = xact_account(xact); + assert(acct); + + account_xdata_t& xdata = account_xdata(*acct); + add_transaction_to(xact, xdata.value); + + xdata.count++; if (xact.flags & TRANSACTION_VIRTUAL) - account_xdata_(*xact.account).virtuals++; + xdata.virtuals++; item_handler<transaction_t>::operator()(xact); } |