summaryrefslogtreecommitdiff
path: root/src/csv.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-09-19 08:06:20 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-09-19 08:06:20 -0400
commitfdc7a4e4c5423e79df4ad8905b5a67d45d2f85bc (patch)
treeb7aa301f7d884315f00c42903778ea549e7833d7 /src/csv.cc
parent43ba0bb03807eea3fdcd4dd40fba10b00f823e24 (diff)
downloadfork-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.cc23
1 files changed, 5 insertions, 18 deletions
diff --git a/src/csv.cc b/src/csv.cc
index c075622e..e823ed41 100644
--- a/src/csv.cc
+++ b/src/csv.cc
@@ -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 << ',';