summaryrefslogtreecommitdiff
path: root/src/output.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-24 19:40:16 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-24 19:40:16 -0400
commitbc51cd4651225ad95190880c4d6f71e3a069ebbc (patch)
treec8c0288a029c403ad8f718393c71474edf0cc45d /src/output.cc
parent129b2de901ccfaa01f7c4a520c91787d83291ec3 (diff)
downloadfork-ledger-bc51cd4651225ad95190880c4d6f71e3a069ebbc.tar.gz
fork-ledger-bc51cd4651225ad95190880c4d6f71e3a069ebbc.tar.bz2
fork-ledger-bc51cd4651225ad95190880c4d6f71e3a069ebbc.zip
Value scopes now take a parent scope for chaining
Diffstat (limited to 'src/output.cc')
-rw-r--r--src/output.cc20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/output.cc b/src/output.cc
index f53e60c9..9d2e0cb6 100644
--- a/src/output.cc
+++ b/src/output.cc
@@ -90,14 +90,10 @@ void format_posts::operator()(post_t& post)
else
out << '\n';
- value_scope_t val_scope(string_value(report_title));
- bind_scope_t inner_scope(bound_scope, val_scope);
-
- format_t group_title_format;
- group_title_format
- .parse_format(report.HANDLER(group_title_format_).str());
+ value_scope_t val_scope(bound_scope, string_value(report_title));
+ format_t group_title_format(report.HANDLER(group_title_format_).str());
- out << group_title_format(inner_scope);
+ out << group_title_format(val_scope);
report_title = "";
}
@@ -176,14 +172,10 @@ std::size_t format_accounts::post_account(account_t& account, const bool flat)
else
out << '\n';
- value_scope_t val_scope(string_value(report_title));
- bind_scope_t inner_scope(bound_scope, val_scope);
-
- format_t group_title_format;
- group_title_format
- .parse_format(report.HANDLER(group_title_format_).str());
+ value_scope_t val_scope(bound_scope, string_value(report_title));
+ format_t group_title_format(report.HANDLER(group_title_format_).str());
- out << group_title_format(inner_scope);
+ out << group_title_format(val_scope);
report_title = "";
}