summaryrefslogtreecommitdiff
path: root/src/output.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-07 05:49:20 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-07 08:32:13 -0400
commit8bd362b5d17782cf8fa5317017a1c5d73d76f1b7 (patch)
tree00e3897a80fd1f880e86992bea5f684c04be8566 /src/output.cc
parent6c8485e6ea9c8648dad10bbcde2a74c34e871ead (diff)
downloadfork-ledger-8bd362b5d17782cf8fa5317017a1c5d73d76f1b7.tar.gz
fork-ledger-8bd362b5d17782cf8fa5317017a1c5d73d76f1b7.tar.bz2
fork-ledger-8bd362b5d17782cf8fa5317017a1c5d73d76f1b7.zip
Minor optimization of how non --empty is handled
Diffstat (limited to 'src/output.cc')
-rw-r--r--src/output.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/output.cc b/src/output.cc
index f697dee4..5cef19bc 100644
--- a/src/output.cc
+++ b/src/output.cc
@@ -224,9 +224,11 @@ format_accounts::mark_accounts(account_t& account, const bool flat)
if (account.parent &&
(account.has_xflags(ACCOUNT_EXT_VISITED) || (! flat && visited > 0))) {
bind_scope_t bound_scope(report, account);
+ call_scope_t call_scope(bound_scope);
if ((! flat && to_display > 1) ||
((flat || to_display != 1 ||
account.has_xflags(ACCOUNT_EXT_VISITED)) &&
+ (report.HANDLED(empty) || report.fn_display_total(call_scope)) &&
disp_pred(bound_scope))) {
account.xdata().add_flags(ACCOUNT_EXT_TO_DISPLAY);
DEBUG("account.display", "Marking account as TO_DISPLAY");