diff options
author | John Wiegley <johnw@newartisans.com> | 2008-07-31 17:48:29 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-07-31 17:48:29 -0400 |
commit | e5048ec71bf114c351c62844b7603893195df4d4 (patch) | |
tree | 4153105f62fc6a244811df3c2e34366344c25792 /value.cc | |
parent | 99313ebc6c3779f692f9f1bd70cc69a236f5eb78 (diff) | |
download | fork-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.cc | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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); } |