diff options
Diffstat (limited to 'src/compare.cc')
-rw-r--r-- | src/compare.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/compare.cc b/src/compare.cc index 547acc18..f0edff76 100644 --- a/src/compare.cc +++ b/src/compare.cc @@ -33,8 +33,10 @@ #include "compare.h" #include "op.h" +#include "scope.h" #include "post.h" #include "account.h" +#include "report.h" namespace ledger { @@ -65,6 +67,20 @@ void push_sort_value(std::list<sort_value_t>& sort_values, } template <> +void compare_items<post_t>::find_sort_values( + std::list<sort_value_t>& sort_values, scope_t& scope) { + bind_scope_t bound_scope(report, scope); + push_sort_value(sort_values, sort_order.get_op(), bound_scope); +} + +template <> +void compare_items<account_t>::find_sort_values( + std::list<sort_value_t>& sort_values, scope_t& scope) { + bind_scope_t bound_scope(report, scope); + push_sort_value(sort_values, sort_order.get_op(), bound_scope); +} + +template <> bool compare_items<post_t>::operator()(post_t * left, post_t * right) { assert(left); |