From 7bbca2bff5f750e52ba3d452c6569556e857284d Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 14 Feb 2009 04:58:44 -0400 Subject: Removed an #if 0'd function from iterators.cc --- src/iterators.cc | 45 --------------------------------------------- 1 file changed, 45 deletions(-) (limited to 'src/iterators.cc') 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& handler) -{ - std::list xact_temps; - std::list entry_temps; - std::list 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 -- cgit v1.2.3