summaryrefslogtreecommitdiff
path: root/src/iterators.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-03 17:43:38 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-03 17:43:38 -0400
commit27b86a5388a9b1a5d5c748fa7e6f8aa4a2f1a3f4 (patch)
treed4d4d279d70a03d8e8a0d5b39afeb34c88e87d70 /src/iterators.cc
parentc3cc935ba6f22f580518fd8858fbe424f2842f31 (diff)
downloadfork-ledger-27b86a5388a9b1a5d5c748fa7e6f8aa4a2f1a3f4.tar.gz
fork-ledger-27b86a5388a9b1a5d5c748fa7e6f8aa4a2f1a3f4.tar.bz2
fork-ledger-27b86a5388a9b1a5d5c748fa7e6f8aa4a2f1a3f4.zip
Avoid unnecessary object copying when using foreach
Diffstat (limited to 'src/iterators.cc')
-rw-r--r--src/iterators.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/iterators.cc b/src/iterators.cc
index f3a68978..ade1d4b3 100644
--- a/src/iterators.cc
+++ b/src/iterators.cc
@@ -94,9 +94,9 @@ void posts_commodities_iterator::reset(journal_t& journal)
comm->varied_history()) {
account_t * account = journal.master->find_account(comm->symbol());
- foreach (commodity_t::history_by_commodity_map::value_type pair,
+ foreach (commodity_t::history_by_commodity_map::value_type& pair,
history->histories) {
- foreach (commodity_t::history_map::value_type hpair,
+ foreach (commodity_t::history_map::value_type& hpair,
pair.second.prices) {
xact_t * xact;
string symbol = hpair.second.commodity().symbol();