diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-19 16:53:25 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-19 16:53:25 -0400 |
commit | 9805abbf2b38d64308bac536eea40e544e8f7cfe (patch) | |
tree | 32f6b6ae629409a118efdbc99f377fa86640e33d /src/value.cc | |
parent | d67c9fee0f0f576481065c7d50182a04bf5df37e (diff) | |
download | ledger-9805abbf2b38d64308bac536eea40e544e8f7cfe.tar.gz ledger-9805abbf2b38d64308bac536eea40e544e8f7cfe.tar.bz2 ledger-9805abbf2b38d64308bac536eea40e544e8f7cfe.zip |
Allow for sorting of the balance report
Sorting is repeated at each level of the hierarchy, unless --flat was
specified in which case it applies to the entire applicable accounts
list.
Diffstat (limited to 'src/value.cc')
-rw-r--r-- | src/value.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/value.cc b/src/value.cc index 96fb6647..3b9cfb00 100644 --- a/src/value.cc +++ b/src/value.cc @@ -1424,6 +1424,9 @@ bool sort_value_is_less_than(const std::list<sort_value_t>& left_values, while (left_iter != left_values.end() && right_iter != right_values.end()) { + DEBUG("value.sort", + "Comparing " << (*left_iter).value << " < " << (*right_iter).value); + if ((*left_iter).value < (*right_iter).value) return ! (*left_iter).inverted; else if ((*left_iter).value > (*right_iter).value) @@ -1434,7 +1437,7 @@ bool sort_value_is_less_than(const std::list<sort_value_t>& left_values, assert(left_iter == left_values.end()); assert(right_iter == right_values.end()); - return true; + return false; } } // namespace ledger |