diff options
author | John Wiegley <johnw@newartisans.com> | 2010-06-03 17:43:38 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-06-03 17:43:38 -0400 |
commit | 27b86a5388a9b1a5d5c748fa7e6f8aa4a2f1a3f4 (patch) | |
tree | d4d4d279d70a03d8e8a0d5b39afeb34c88e87d70 /src/commodity.cc | |
parent | c3cc935ba6f22f580518fd8858fbe424f2842f31 (diff) | |
download | fork-ledger-27b86a5388a9b1a5d5c748fa7e6f8aa4a2f1a3f4.tar.gz fork-ledger-27b86a5388a9b1a5d5c748fa7e6f8aa4a2f1a3f4.tar.bz2 fork-ledger-27b86a5388a9b1a5d5c748fa7e6f8aa4a2f1a3f4.zip |
Avoid unnecessary object copying when using foreach
Diffstat (limited to 'src/commodity.cc')
-rw-r--r-- | src/commodity.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/commodity.cc b/src/commodity.cc index 1b85910f..a1c26403 100644 --- a/src/commodity.cc +++ b/src/commodity.cc @@ -262,7 +262,7 @@ commodity_t::varied_history_t::find_price(const commodity_t& source, price_point_t best; bool found = false; - foreach (history_by_commodity_map::value_type hist, histories) { + foreach (const history_by_commodity_map::value_type& hist, histories) { commodity_t& comm(*hist.first); if (comm == source) continue; |