From 3dc200983d5057a7760aeb9e864479c902d7e1d7 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 5 Nov 2009 02:23:49 -0500 Subject: Moved xdata clearing code into each type proper --- src/journal.cc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/journal.cc') 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()) { -- cgit v1.2.3