diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-05 02:23:49 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-05 02:27:39 -0500 |
commit | 3dc200983d5057a7760aeb9e864479c902d7e1d7 (patch) | |
tree | 6f754a113f97af3dd856cd7e507f91da9e9e0402 /src/journal.cc | |
parent | 40a430139edd12d9f580f5616571bc3ed8709d73 (diff) | |
download | fork-ledger-3dc200983d5057a7760aeb9e864479c902d7e1d7.tar.gz fork-ledger-3dc200983d5057a7760aeb9e864479c902d7e1d7.tar.bz2 fork-ledger-3dc200983d5057a7760aeb9e864479c902d7e1d7.zip |
Moved xdata clearing code into each type proper
Diffstat (limited to 'src/journal.cc')
-rw-r--r-- | src/journal.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/journal.cc b/src/journal.cc index 4b5172f5..4d6e084e 100644 --- a/src/journal.cc +++ b/src/journal.cc @@ -134,6 +134,23 @@ bool journal_t::remove_xact(xact_t * xact) return true; } +void journal_t::clear_xdata() +{ + foreach (xact_t * xact, xacts) + if (! xact->has_flags(ITEM_TEMP)) + xact->clear_xdata(); + + foreach (auto_xact_t * xact, auto_xacts) + if (! xact->has_flags(ITEM_TEMP)) + xact->clear_xdata(); + + foreach (period_xact_t * xact, period_xacts) + if (! xact->has_flags(ITEM_TEMP)) + xact->clear_xdata(); + + master->clear_xdata(); +} + bool journal_t::valid() const { if (! master->valid()) { |