diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-07 23:30:40 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-07 23:30:40 -0400 |
commit | ffba456113c46c5c5f16cf65eff650b642e074e9 (patch) | |
tree | acc57d7a957f92c39e46231dc818476e05f3c368 /src/entry.cc | |
parent | 6f37d88391dc35e92f362563411208d2430d1c74 (diff) | |
download | ledger-ffba456113c46c5c5f16cf65eff650b642e074e9.tar.gz ledger-ffba456113c46c5c5f16cf65eff650b642e074e9.tar.bz2 ledger-ffba456113c46c5c5f16cf65eff650b642e074e9.zip |
Several fixes to get the state flags to appear right in "print".
Diffstat (limited to 'src/entry.cc')
-rw-r--r-- | src/entry.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/entry.cc b/src/entry.cc index 4309f9d9..5082b34a 100644 --- a/src/entry.cc +++ b/src/entry.cc @@ -61,14 +61,14 @@ entry_base_t::~entry_base_t() item_t::state_t entry_base_t::state() const { bool first = true; - state_t result = UNCLEARED; + state_t result = CLEARED; foreach (xact_t * xact, xacts) { - if ((result == UNCLEARED && xact->_state != UNCLEARED) || - (result == PENDING && xact->_state == CLEARED)) - result = xact->_state; + if (xact->_state == UNCLEARED) + return UNCLEARED; + else if (xact->_state == PENDING) + result = PENDING; } - return result; } |