(parse_and_report): Rearranged some code for efficiency's sake.
This commit is contained in:
parent
7a38b49048
commit
74456d89b5
1 changed files with 14 additions and 12 deletions
6
main.cc
6
main.cc
|
|
@ -434,6 +434,9 @@ def vmax(d, val):\n\
|
||||||
else
|
else
|
||||||
formatter = base_formatter;
|
formatter = base_formatter;
|
||||||
|
|
||||||
|
if (command == "w") {
|
||||||
|
write_textual_journal(*journal, *arg, *formatter, *out);
|
||||||
|
} else {
|
||||||
formatter = chain_xact_handlers(command, formatter, journal.get(),
|
formatter = chain_xact_handlers(command, formatter, journal.get(),
|
||||||
journal->master, formatter_ptrs);
|
journal->master, formatter_ptrs);
|
||||||
|
|
||||||
|
|
@ -441,13 +444,12 @@ def vmax(d, val):\n\
|
||||||
walk_transactions(new_entry->transactions, *formatter);
|
walk_transactions(new_entry->transactions, *formatter);
|
||||||
else if (command == "P" || command == "D")
|
else if (command == "P" || command == "D")
|
||||||
walk_commodities(commodity_t::commodities, *formatter);
|
walk_commodities(commodity_t::commodities, *formatter);
|
||||||
else if (command == "w")
|
|
||||||
write_textual_journal(*journal, *arg, *formatter, *out);
|
|
||||||
else
|
else
|
||||||
walk_entries(journal->entries, *formatter);
|
walk_entries(journal->entries, *formatter);
|
||||||
|
|
||||||
if (command != "P" && command != "D")
|
if (command != "P" && command != "D")
|
||||||
formatter->flush();
|
formatter->flush();
|
||||||
|
}
|
||||||
|
|
||||||
// If we are generating a reconcile report, determine the final set
|
// If we are generating a reconcile report, determine the final set
|
||||||
// of transactions.
|
// of transactions.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue