summaryrefslogtreecommitdiff
path: root/op.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-07-31 17:48:29 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-07-31 17:48:29 -0400
commite5048ec71bf114c351c62844b7603893195df4d4 (patch)
tree4153105f62fc6a244811df3c2e34366344c25792 /op.cc
parent99313ebc6c3779f692f9f1bd70cc69a236f5eb78 (diff)
downloadfork-ledger-e5048ec71bf114c351c62844b7603893195df4d4.tar.gz
fork-ledger-e5048ec71bf114c351c62844b7603893195df4d4.tar.bz2
fork-ledger-e5048ec71bf114c351c62844b7603893195df4d4.zip
Change many uses of for+iterator to use Boost.Foreach.
Diffstat (limited to 'op.cc')
-rw-r--r--op.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/op.cc b/op.cc
index dd808eb2..5a8c0ea9 100644
--- a/op.cc
+++ b/op.cc
@@ -408,10 +408,8 @@ void expr_t::op_t::compute(value_t& result,
result.cast(value_t::AMOUNT);
} else {
value_t temp;
- for (balance_t::amounts_map::const_iterator i = bal->amounts.begin();
- i != bal->amounts.end();
- i++) {
- amount_t x = (*i).second;
+ for (balance_t::amounts_map::value_type pair, bal->amounts) {
+ amount_t x = pair.second;
x.clear_commodity();
temp += x;
}