From 3ae4a38e4df38ed857dac8ffa26dfb1387f2b62d Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 7 Mar 2012 05:19:21 -0600 Subject: Fixed parsing of "deferred notes" in auto xacts --- src/xact.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/xact.h') diff --git a/src/xact.h b/src/xact.h index 7d7fb826..df82258d 100644 --- a/src/xact.h +++ b/src/xact.h @@ -173,17 +173,19 @@ public: typedef std::list deferred_notes_list; optional deferred_notes; + post_t * active_post; - auto_xact_t() : try_quick_match(true) { + auto_xact_t() : try_quick_match(true), active_post(NULL) { TRACE_CTOR(auto_xact_t, ""); } auto_xact_t(const auto_xact_t& other) : xact_base_t(), predicate(other.predicate), - try_quick_match(other.try_quick_match) { + try_quick_match(other.try_quick_match), + active_post(other.active_post) { TRACE_CTOR(auto_xact_t, "copy"); } auto_xact_t(const predicate_t& _predicate) - : predicate(_predicate), try_quick_match(true) + : predicate(_predicate), try_quick_match(true), active_post(NULL) { TRACE_CTOR(auto_xact_t, "const predicate_t&"); } @@ -202,12 +204,12 @@ public: } } - virtual void parse_tags(const char * p, - scope_t&, - bool overwrite_existing = true) { + virtual void parse_tags(const char * p, scope_t&, + bool overwrite_existing = true) { if (! deferred_notes) deferred_notes = deferred_notes_list(); deferred_notes->push_back(deferred_tag_data_t(p, overwrite_existing)); + deferred_notes->back().apply_to_post = active_post; } virtual void extend_xact(xact_base_t& xact, parse_context_t& context); -- cgit v1.2.3