From 847a5fae3d6ec2c011da95f282abc3947e4da1ef Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 14 Jun 2010 00:38:56 -0400 Subject: Removed some unneeded code --- src/filters.cc | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) (limited to 'src/filters.cc') diff --git a/src/filters.cc b/src/filters.cc index 2992f512..69183991 100644 --- a/src/filters.cc +++ b/src/filters.cc @@ -501,26 +501,15 @@ void related_posts::flush() { if (posts.size() > 0) { foreach (post_t * post, posts) { - if (post->xact) { - foreach (post_t * r_post, post->xact->posts) { - post_t::xdata_t& xdata(r_post->xdata()); - if (! xdata.has_flags(POST_EXT_HANDLED) && - (! xdata.has_flags(POST_EXT_RECEIVED) ? - ! r_post->has_flags(ITEM_GENERATED | POST_VIRTUAL) : - also_matching)) { - xdata.add_flags(POST_EXT_HANDLED); - item_handler::operator()(*r_post); - } - } - } else { - // This code should only be reachable from the "output" - // command, since that is the only command which attempts to - // output auto or period xacts. - post_t::xdata_t& xdata(post->xdata()); + assert(post->xact); + foreach (post_t * r_post, post->xact->posts) { + post_t::xdata_t& xdata(r_post->xdata()); if (! xdata.has_flags(POST_EXT_HANDLED) && - ! post->has_flags(ITEM_GENERATED)) { + (! xdata.has_flags(POST_EXT_RECEIVED) ? + ! r_post->has_flags(ITEM_GENERATED | POST_VIRTUAL) : + also_matching)) { xdata.add_flags(POST_EXT_HANDLED); - item_handler::operator()(*post); + item_handler::operator()(*r_post); } } } -- cgit v1.2.3