From fdc7a4e4c5423e79df4ad8905b5a67d45d2f85bc Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 19 Sep 2008 08:06:20 -0400 Subject: Factored common parts of entry_t and xact_t into new item_t --- src/csv.cc | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'src/csv.cc') 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 << ','; -- cgit v1.2.3