summaryrefslogtreecommitdiff
path: root/value.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 /value.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 'value.cc')
-rw-r--r--value.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/value.cc b/value.cc
index 8edc5df1..1f8d4823 100644
--- a/value.cc
+++ b/value.cc
@@ -467,10 +467,8 @@ value_t& value_t::operator-=(const value_t& val)
sequence_t& seq(as_sequence_lval());
if (val.is_sequence()) {
- for (sequence_t::const_iterator i = val.as_sequence().begin();
- i != val.as_sequence().end();
- i++) {
- sequence_t::iterator j = std::find(seq.begin(), seq.end(), *i);
+ foreach (const value_t& v, val.as_sequence()) {
+ sequence_t::iterator j = std::find(seq.begin(), seq.end(), v);
if (j != seq.end())
seq.erase(j);
}