summaryrefslogtreecommitdiff
path: root/src/iterators.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-19 17:25:29 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-19 17:25:29 -0400
commit45e93d5f317a778f50cec50b0bf246c131c5524f (patch)
tree4d901736feb3e79bf4e75444d537136fb6c0a697 /src/iterators.cc
parent1d85e992cad05ee5ef38f963182332e3d9328c4e (diff)
downloadfork-ledger-45e93d5f317a778f50cec50b0bf246c131c5524f.tar.gz
fork-ledger-45e93d5f317a778f50cec50b0bf246c131c5524f.tar.bz2
fork-ledger-45e93d5f317a778f50cec50b0bf246c131c5524f.zip
Added some sort-related debugging code
Diffstat (limited to 'src/iterators.cc')
-rw-r--r--src/iterators.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/iterators.cc b/src/iterators.cc
index 3a59c7aa..a01c4918 100644
--- a/src/iterators.cc
+++ b/src/iterators.cc
@@ -198,6 +198,12 @@ void sorted_accounts_iterator::push_back(account_t& account)
std::stable_sort(accounts_list.back().begin(),
accounts_list.back().end(),
compare_items<account_t>(sort_cmp));
+#if defined(DEBUG_ON)
+ if (SHOW_DEBUG("accounts.sorted")) {
+ foreach (account_t * account, accounts_list.back())
+ DEBUG("accounts.sorted", "Account: " << account->fullname());
+ }
+#endif
} else {
sort_accounts(account, accounts_list.back());
}