summaryrefslogtreecommitdiff
path: root/src/filters.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2011-07-17 16:25:05 -0500
committerJohn Wiegley <johnw@newartisans.com>2011-07-17 16:25:05 -0500
commitd0dfff62a6a3a685f19a5bed8716f7b661dc8c60 (patch)
tree2fb3d6cf621f0dc708dd41dc94107c5283c17959 /src/filters.cc
parent65b3a778e2abb24e40945c1e3b4a9081c6a55ecd (diff)
downloadfork-ledger-d0dfff62a6a3a685f19a5bed8716f7b661dc8c60.tar.gz
fork-ledger-d0dfff62a6a3a685f19a5bed8716f7b661dc8c60.tar.bz2
fork-ledger-d0dfff62a6a3a685f19a5bed8716f7b661dc8c60.zip
Changed how some of the filters are constructed
Diffstat (limited to 'src/filters.cc')
-rw-r--r--src/filters.cc23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/filters.cc b/src/filters.cc
index 686bef3f..27227ee9 100644
--- a/src/filters.cc
+++ b/src/filters.cc
@@ -524,14 +524,11 @@ display_filter_posts::display_filter_posts(post_handler_ptr handler,
report_t& _report,
bool _show_rounding)
: item_handler<post_t>(handler), report(_report),
+ display_amount_expr(report.HANDLER(display_amount_).expr),
+ display_total_expr(report.HANDLER(display_total_).expr),
show_rounding(_show_rounding)
{
- TRACE_CTOR(display_filter_posts,
- "post_handler_ptr, report_t&, account_t&, bool");
-
- display_amount_expr = report.HANDLER(display_amount_).expr;
- display_total_expr = report.HANDLER(display_total_).expr;
-
+ TRACE_CTOR(display_filter_posts, "post_handler_ptr, report_t&, bool");
create_accounts();
}
@@ -607,17 +604,17 @@ changed_value_posts::changed_value_posts
bool _show_unrealized,
display_filter_posts * _display_filter)
: item_handler<post_t>(handler), report(_report),
+ total_expr(report.HANDLED(revalued_total_) ?
+ report.HANDLER(revalued_total_).expr :
+ report.HANDLER(display_total_).expr),
+ display_total_expr(report.HANDLER(display_total_).expr),
+ changed_values_only(report.HANDLED(revalued_only)),
for_accounts_report(_for_accounts_report),
show_unrealized(_show_unrealized), last_post(NULL),
display_filter(_display_filter)
{
- TRACE_CTOR(changed_value_posts, "post_handler_ptr, report_t&, bool");
-
- total_expr = (report.HANDLED(revalued_total_) ?
- report.HANDLER(revalued_total_).expr :
- report.HANDLER(display_total_).expr);
- display_total_expr = report.HANDLER(display_total_).expr;
- changed_values_only = report.HANDLED(revalued_only);
+ TRACE_CTOR(changed_value_posts,
+ "post_handler_ptr, report_t&, bool, bool, display_filter_posts *");
string gains_equity_account_name;
if (report.HANDLED(unrealized_gains_))