From f1e8a0a42f9b0d2b11201a2b67bea6f60e37c76f Mon Sep 17 00:00:00 2001 From: Rahix Date: Tue, 12 May 2020 18:41:33 +0200 Subject: collapse_posts: Add a collapse_depth attribute Replace the hardcoded depth of 3 with a class attribute that can later be set from a commandline argument. --- src/filters.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/filters.h') diff --git a/src/filters.h b/src/filters.h index 40e25ac0..be2e0e84 100644 --- a/src/filters.h +++ b/src/filters.h @@ -439,6 +439,7 @@ class collapse_posts : public item_handler temporaries_t temps; totals_map totals; bool only_collapse_if_zero; + unsigned short collapse_depth; std::list component_posts; report_t& report; @@ -450,12 +451,14 @@ public: expr_t& _amount_expr, predicate_t _display_predicate, predicate_t _only_predicate, - bool _only_collapse_if_zero = false) + bool _only_collapse_if_zero = false, + unsigned short _collapse_depth = 0) : item_handler(handler), amount_expr(_amount_expr), display_predicate(_display_predicate), only_predicate(_only_predicate), count(0), last_xact(NULL), last_post(NULL), - only_collapse_if_zero(_only_collapse_if_zero), report(_report) { + only_collapse_if_zero(_only_collapse_if_zero), + collapse_depth(_collapse_depth), report(_report) { TRACE_CTOR(collapse_posts, "post_handler_ptr, ..."); } virtual ~collapse_posts() { -- cgit v1.2.3