diff options
author | John Wiegley <johnw@newartisans.com> | 2009-03-06 00:26:30 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-03-06 00:27:29 -0400 |
commit | 2728e4d55e1c9e84ee5aae4ee8e9c380198d1c99 (patch) | |
tree | 5b5e8207db2a37684b2527acad7bccdd770fc1a4 /src/filters.cc | |
parent | dd23edd5cee8e712e13a3b5eefffcc3c57bf9e10 (diff) | |
download | fork-ledger-2728e4d55e1c9e84ee5aae4ee8e9c380198d1c99.tar.gz fork-ledger-2728e4d55e1c9e84ee5aae4ee8e9c380198d1c99.tar.bz2 fork-ledger-2728e4d55e1c9e84ee5aae4ee8e9c380198d1c99.zip |
Changed the way that account balances are computed
Diffstat (limited to 'src/filters.cc')
-rw-r--r-- | src/filters.cc | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/src/filters.cc b/src/filters.cc index 2895bf7f..f8736667 100644 --- a/src/filters.cc +++ b/src/filters.cc @@ -207,30 +207,8 @@ void calc_posts::operator()(post_t& post) account_t * acct = post.reported_account(); acct->xdata().add_flags(ACCOUNT_EXT_VISITED); - if (! account_wise) { + if (! account_wise) add_or_set_value(xdata.total, xdata.visited_value); - } else { - account_t::xdata_t * acct_xdata = &acct->xdata(); - - add_or_set_value(acct_xdata->self_details.total, xdata.visited_value); - - acct_xdata->self_details.posts_count++; - acct_xdata->self_details.posts_virtuals_count++; - - while (true) { - add_or_set_value(acct_xdata->family_details.total, xdata.visited_value); - - acct_xdata->family_details.posts_count++; - if (post.has_flags(POST_VIRTUAL)) - acct_xdata->family_details.posts_virtuals_count++; - - acct = acct->parent; - if (acct) - acct_xdata = &acct->xdata(); - else - break; - } - } item_handler<post_t>::operator()(post); |