From 96dc3dcf9e757ebe4361a5f675b3de8dcf3ec416 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 30 Jun 2011 09:26:14 -0500 Subject: Simplified some code --- src/filters.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/filters.cc') diff --git a/src/filters.cc b/src/filters.cc index 89dc552e..2a040029 100644 --- a/src/filters.cc +++ b/src/filters.cc @@ -1397,13 +1397,12 @@ void inject_posts::operator()(post_t& post) { foreach (tags_list_pair& pair, tags_list) { optional tag_value = post.get_tag(pair.first, false); + // When checking if the transaction has the tag, only inject once + // per transaction. if (! tag_value && - pair.second.second.find(post.xact) == pair.second.second.end()) { - // When checking if the transaction has the tag, only inject once - // per transaction. + pair.second.second.find(post.xact) == pair.second.second.end() && + (tag_value = post.xact->get_tag(pair.first))) pair.second.second.insert(post.xact); - tag_value = post.xact->get_tag(pair.first); - } if (tag_value) { xact_t& xact = temps.copy_xact(*post.xact); -- cgit v1.2.3