From 48dc654eda27c01d0bad88674d21d0e33e5472f6 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 12 Nov 2009 05:09:25 -0500 Subject: Added has_xdata() methods for journal_t and xact_t --- src/journal.cc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/journal.cc') diff --git a/src/journal.cc b/src/journal.cc index c764dbce..2366ce30 100644 --- a/src/journal.cc +++ b/src/journal.cc @@ -211,6 +211,26 @@ std::size_t journal_t::read(const path& pathname, return count; } +bool journal_t::has_xdata() +{ + foreach (xact_t * xact, xacts) + if (xact->has_xdata()) + return true; + + foreach (auto_xact_t * xact, auto_xacts) + if (xact->has_xdata()) + return true; + + foreach (period_xact_t * xact, period_xacts) + if (xact->has_xdata()) + return true; + + if (master->has_xdata() || master->children_with_xdata()) + return true; + + return false; +} + void journal_t::clear_xdata() { foreach (xact_t * xact, xacts) -- cgit v1.2.3