From 6432d7c594023fa5a4fbc9072c28bdd80b670c8a Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 14 Aug 2008 04:14:48 -0400 Subject: Added back a lot of hacktastic logic from 2.6.1 that made the "bal" command somewhat smart about how it interpreted certain options. Beware, code, for your days are not long-lived. --- src/output.cc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/output.cc') diff --git a/src/output.cc b/src/output.cc index e3b31df4..582fb0cf 100644 --- a/src/output.cc +++ b/src/output.cc @@ -171,7 +171,7 @@ bool format_accounts::disp_subaccounts_p(account_t& account, { bool display = false; unsigned int counted = 0; - bool matches = disp_pred(account); + bool matches = should_display(account); bool computed = false; value_t acct_total; value_t result; @@ -179,7 +179,7 @@ bool format_accounts::disp_subaccounts_p(account_t& account, to_show = NULL; foreach (accounts_map::value_type pair, account.accounts) { - if (! disp_pred(*pair.second)) + if (! should_display(*pair.second)) continue; call_scope_t args(*pair.second); @@ -219,13 +219,11 @@ bool format_accounts::display_account(account_t& account) if (disp_subaccounts_p(account, account_to_show)) return true; - return ! account_to_show && disp_pred(account); + return ! account_to_show && should_display(account); } -format_equity::format_equity(report_t& _report, - const string& _format, - const string& display_predicate) - : format_accounts(_report, "", display_predicate) +format_equity::format_equity(report_t& _report, const string& _format) + : format_accounts(_report) { const char * f = _format.c_str(); -- cgit v1.2.3