summaryrefslogtreecommitdiff
path: root/src/value.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-19 16:53:25 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-19 16:53:25 -0400
commit9805abbf2b38d64308bac536eea40e544e8f7cfe (patch)
tree32f6b6ae629409a118efdbc99f377fa86640e33d /src/value.cc
parentd67c9fee0f0f576481065c7d50182a04bf5df37e (diff)
downloadledger-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.cc5
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