diff options
author | John Wiegley <johnw@newartisans.com> | 2019-01-14 17:29:50 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-14 17:29:50 -0800 |
commit | b29d07ac62a9e7df427ab71a789cfcc96de9f4db (patch) | |
tree | 7d0c769098f5b69dd80b24c8a831d7255d70a71c /src/output.cc | |
parent | ccb7019c8b014b907d88bbcfb802b7f1458383b6 (diff) | |
parent | 88fd3a38b9456998c59dd49bb225504156274c83 (diff) | |
download | fork-ledger-b29d07ac62a9e7df427ab71a789cfcc96de9f4db.tar.gz fork-ledger-b29d07ac62a9e7df427ab71a789cfcc96de9f4db.tar.bz2 fork-ledger-b29d07ac62a9e7df427ab71a789cfcc96de9f4db.zip |
Merge branch 'next' into move-have-edit
Diffstat (limited to 'src/output.cc')
-rw-r--r-- | src/output.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/output.cc b/src/output.cc index c2fa83ac..09d3ad9e 100644 --- a/src/output.cc +++ b/src/output.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2018, John Wiegley. All rights reserved. + * Copyright (c) 2003-2019, John Wiegley. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -284,8 +284,9 @@ void report_accounts::flush() std::ostream& out(report.output_stream); format_t prepend_format; std::size_t prepend_width; + bool do_prepend_format; - if (report.HANDLED(prepend_format_)) { + if ((do_prepend_format = report.HANDLED(prepend_format_))) { prepend_format.parse_format(report.HANDLER(prepend_format_).str()); prepend_width = report.HANDLED(prepend_width_) ? lexical_cast<std::size_t>(report.HANDLER(prepend_width_).str()) @@ -293,7 +294,7 @@ void report_accounts::flush() } foreach (accounts_pair& entry, accounts) { - if (prepend_format) { + if (do_prepend_format) { bind_scope_t bound_scope(report, *entry.first); out.width(static_cast<std::streamsize>(prepend_width)); out << prepend_format(bound_scope); |