diff options
author | John Wiegley <johnw@newartisans.com> | 2008-09-19 08:06:20 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-09-19 08:06:20 -0400 |
commit | fdc7a4e4c5423e79df4ad8905b5a67d45d2f85bc (patch) | |
tree | b7aa301f7d884315f00c42903778ea549e7833d7 /src/csv.cc | |
parent | 43ba0bb03807eea3fdcd4dd40fba10b00f823e24 (diff) | |
download | fork-ledger-fdc7a4e4c5423e79df4ad8905b5a67d45d2f85bc.tar.gz fork-ledger-fdc7a4e4c5423e79df4ad8905b5a67d45d2f85bc.tar.bz2 fork-ledger-fdc7a4e4c5423e79df4ad8905b5a67d45d2f85bc.zip |
Factored common parts of entry_t and xact_t into new item_t
Diffstat (limited to 'src/csv.cc')
-rw-r--r-- | src/csv.cc | 23 |
1 files changed, 5 insertions, 18 deletions
@@ -102,28 +102,15 @@ void format_csv_xacts::operator()(xact_t& xact) } out << ','; - switch (xact.state) { - case xact_t::CLEARED: + switch (xact.state()) { + case item_t::CLEARED: write_escaped_string(out, "*"); break; - case xact_t::PENDING: + case item_t::PENDING: write_escaped_string(out, "!"); break; - default: { - xact_t::state_t state; - if (xact.entry->get_state(&state)) - switch (state) { - case xact_t::CLEARED: - write_escaped_string(out, "*"); - break; - case xact_t::PENDING: - write_escaped_string(out, "!"); - break; - default: - write_escaped_string(out, ""); - break; - } - } + default: + break; } out << ','; |