diff options
Diffstat (limited to 'src/compare.cc')
-rw-r--r-- | src/compare.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/compare.cc b/src/compare.cc index 6b0cbe0d..015c28bc 100644 --- a/src/compare.cc +++ b/src/compare.cc @@ -53,10 +53,12 @@ namespace { sort_values.push_back(sort_value_t()); sort_values.back().inverted = inverted; - sort_values.back().value = expr_t(node).calc(*scope).reduced(); + sort_values.back().value = + expr_t(node).calc(*scope).reduced().simplified(); if (sort_values.back().value.is_null()) - throw calc_error("Could not determine sorting value based an expression"); + throw_(calc_error, + "Could not determine sorting value based an expression"); } } } @@ -107,6 +109,9 @@ bool compare_items<account_t>::operator()(account_t * left, account_t * right) rxdata.add_flags(ACCOUNT_EXT_SORT_CALC); } + DEBUG("value.sort", "Comparing accounts " << left->fullname() + << " <> " << right->fullname()); + return sort_value_is_less_than(lxdata.sort_values, rxdata.sort_values); } |