diff options
author | John Wiegley <johnw@newartisans.com> | 2010-06-14 00:38:56 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-06-14 01:00:11 -0400 |
commit | 847a5fae3d6ec2c011da95f282abc3947e4da1ef (patch) | |
tree | d410214db33ad0ad73c4f857dfad29fe46f52af0 /src/filters.cc | |
parent | e78af146e810eaaf0a44fd5c5d745efa2bbf9561 (diff) | |
download | fork-ledger-847a5fae3d6ec2c011da95f282abc3947e4da1ef.tar.gz fork-ledger-847a5fae3d6ec2c011da95f282abc3947e4da1ef.tar.bz2 fork-ledger-847a5fae3d6ec2c011da95f282abc3947e4da1ef.zip |
Removed some unneeded code
Diffstat (limited to 'src/filters.cc')
-rw-r--r-- | src/filters.cc | 25 |
1 files changed, 7 insertions, 18 deletions
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<post_t>::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<post_t>::operator()(*post); + item_handler<post_t>::operator()(*r_post); } } } |