From 73e2abd1b2e2bacbd353999a7b3edd95a04112c4 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 23 Aug 2004 18:23:31 -0400 Subject: a little cleanup; reversed the meaning of -z and -p (to be more mnemonic) --- main.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'main.cc') diff --git a/main.cc b/main.cc index 30316bb8..81a5d1e5 100644 --- a/main.cc +++ b/main.cc @@ -500,8 +500,9 @@ int main(int argc, char * argv[], char * envp[]) // filter_transactions will only pass through transactions // matching the `display_predicate'. - formatter.reset(new filter_transactions(formatter.release(), - config->display_predicate)); + if (! config->display_predicate.empty()) + formatter.reset(new filter_transactions(formatter.release(), + config->display_predicate)); // calc_transactions computes the running total. When this // appears will determine, for example, whether filtered @@ -560,8 +561,9 @@ int main(int argc, char * argv[], char * envp[]) // This filter_transactions will only pass through transactions // matching the `predicate'. - formatter.reset(new filter_transactions(formatter.release(), - config->predicate)); + if (! config->predicate.empty()) + formatter.reset(new filter_transactions(formatter.release(), + config->predicate)); // Once the filters are chained, walk `journal's entries and start // feeding each transaction that matches `predicate' to the chain. -- cgit v1.2.3