diff options
author | John Wiegley <johnw@newartisans.com> | 2010-03-16 14:20:09 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-03-16 14:20:09 -0400 |
commit | 2f9ea3986947c552322432449e393ee9e96c7e9e (patch) | |
tree | 3fb688b58db21866e8d20e0f532c03090db26e13 /src/filters.h | |
parent | 3e21a171c74cca286638cecae5b050567b500789 (diff) | |
download | fork-ledger-2f9ea3986947c552322432449e393ee9e96c7e9e.tar.gz fork-ledger-2f9ea3986947c552322432449e393ee9e96c7e9e.tar.bz2 fork-ledger-2f9ea3986947c552322432449e393ee9e96c7e9e.zip |
Short-circuit --head handler when count is reached
Diffstat (limited to 'src/filters.h')
-rw-r--r-- | src/filters.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/filters.h b/src/filters.h index 61ae4841..82fbf687 100644 --- a/src/filters.h +++ b/src/filters.h @@ -125,8 +125,9 @@ public: class truncate_xacts : public item_handler<post_t> { - int head_count; - int tail_count; + int head_count; + int tail_count; + bool completed; posts_list posts; std::size_t xacts_seen; @@ -139,7 +140,7 @@ public: int _head_count, int _tail_count) : item_handler<post_t>(handler), head_count(_head_count), tail_count(_tail_count), - xacts_seen(0), last_xact(NULL) { + completed(false), xacts_seen(0), last_xact(NULL) { TRACE_CTOR(truncate_xacts, "post_handler_ptr, int, int"); } virtual ~truncate_xacts() { |