aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2017-08-08 08:38:36 -0700
committerAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2017-08-08 08:39:28 -0700
commitf8e58ee1d02d2476ae92ebc3737e42b8b6a36891 (patch)
tree8ce8590b9c5cc08fc3183b8c41f3008ca4088a03
parent1288dd799f3502f7201fc88d93ae69a1869d06fa (diff)
downloadpaludis-f8e58ee1d02d2476ae92ebc3737e42b8b6a36891.tar.gz
paludis-f8e58ee1d02d2476ae92ebc3737e42b8b6a36891.tar.xz
resolver: use range based for loops (NFC)HEADmaster
Convert a few loops to range based for loops instead of standard for loops.
-rw-r--r--paludis/resolver/get_sameness.cc24
1 files changed, 10 insertions, 14 deletions
diff --git a/paludis/resolver/get_sameness.cc b/paludis/resolver/get_sameness.cc
index 4a07ba6..22d0abd 100644
--- a/paludis/resolver/get_sameness.cc
+++ b/paludis/resolver/get_sameness.cc
@@ -155,28 +155,24 @@ paludis::resolver::get_sameness(
existing_choices = existing_id->choices_key()->parse_value();
std::set<ChoiceNameWithPrefix> i_common, u_common;
- for (Choices::ConstIterator k(installable_choices->begin()), k_end(installable_choices->end()) ;
- k != k_end ; ++k)
+ for (const auto & c : *installable_choices)
{
- if (! (*k)->consider_added_or_changed())
+ if (! c->consider_added_or_changed())
continue;
- for (Choice::ConstIterator i((*k)->begin()), i_end((*k)->end()) ;
- i != i_end ; ++i)
- if (co_explicit == (*i)->origin())
- i_common.insert((*i)->name_with_prefix());
+ for (const auto & v : *c)
+ if (co_explicit == v->origin())
+ i_common.insert(v->name_with_prefix());
}
- for (Choices::ConstIterator k(existing_choices->begin()), k_end(existing_choices->end()) ;
- k != k_end ; ++k)
+ for (const auto & c : *existing_choices)
{
- if (! (*k)->consider_added_or_changed())
+ if (! c->consider_added_or_changed())
continue;
- for (Choice::ConstIterator i((*k)->begin()), i_end((*k)->end()) ;
- i != i_end ; ++i)
- if (co_explicit == (*i)->origin())
- u_common.insert((*i)->name_with_prefix());
+ for (const auto & v : *c)
+ if (co_explicit == v->origin())
+ u_common.insert(v->name_with_prefix());
}
std::set_intersection(