summaryrefslogtreecommitdiff
path: root/src/iterators.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-14 04:58:44 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-14 04:58:44 -0400
commit7bbca2bff5f750e52ba3d452c6569556e857284d (patch)
treec5ece231113f86c031e60579ced56a2abd56a7f4 /src/iterators.cc
parent6b515c0cb39670b28a1ee8f98355aecca71dfbf7 (diff)
downloadfork-ledger-7bbca2bff5f750e52ba3d452c6569556e857284d.tar.gz
fork-ledger-7bbca2bff5f750e52ba3d452c6569556e857284d.tar.bz2
fork-ledger-7bbca2bff5f750e52ba3d452c6569556e857284d.zip
Removed an #if 0'd function from iterators.cc
Diffstat (limited to 'src/iterators.cc')
-rw-r--r--src/iterators.cc45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/iterators.cc b/src/iterators.cc
index df3fd646..9b345282 100644
--- a/src/iterators.cc
+++ b/src/iterators.cc
@@ -205,49 +205,4 @@ account_t * sorted_accounts_iterator::operator()()
return account;
}
-#if 0
-// jww (2008-08-03): This needs to be changed into a commodities->xacts
-// iterator.
-
-// jww (2008-08-03): We then could also use a payees->xacts iterator
-
-void walk_commodities(commodity_pool_t::commodities_by_ident& commodities,
- item_handler<xact_t>& handler)
-{
- std::list<xact_t> xact_temps;
- std::list<entry_t> entry_temps;
- std::list<account_t> acct_temps;
-
- for (commodity_pool_t::commodities_by_ident::iterator
- i = commodities.begin();
- i != commodities.end();
- i++) {
- if ((*i)->has_flags(COMMODITY_NOMARKET))
- continue;
-
- entry_temps.push_back(entry_t());
- acct_temps.push_back(account_t(NULL, (*i)->symbol()));
-
- if ((*i)->history())
- foreach (const commodity_t::history_map::value_type& pair,
- (*i)->history()->prices) {
- entry_temps.back()._date = pair.first.date();
-
- xact_temps.push_back(xact_t(&acct_temps.back()));
- xact_t& temp = xact_temps.back();
- temp.entry = &entry_temps.back();
- temp.amount = pair.second;
- temp.add_flags(XACT_TEMP);
- entry_temps.back().add_xact(&temp);
-
- handler(xact_temps.back());
- }
- }
-
- handler.flush();
-
- clear_entries_xacts(entry_temps);
-}
-#endif
-
} // namespace ledger