aboutsummaryrefslogtreecommitdiff
path: root/paludis/resolver/sanitised_dependencies.cc
diff options
context:
space:
mode:
authorAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2016-08-04 21:57:23 -0700
committerAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2016-08-04 22:11:01 -0700
commitf3cd2455110fad09158275287cbdaa67cc3e15c3 (patch)
treeb1922ea17b1401f0e86c6e3cdaf3a278dade4557 /paludis/resolver/sanitised_dependencies.cc
parente9ccc3a086f57507712a44ef2fadc34affa13af9 (diff)
downloadpaludis-f3cd2455110fad09158275287cbdaa67cc3e15c3.tar.gz
paludis-f3cd2455110fad09158275287cbdaa67cc3e15c3.tar.xz
modernize: convert to range based for-loops
Automated conversion to range based for loops. NFC
Diffstat (limited to 'paludis/resolver/sanitised_dependencies.cc')
-rw-r--r--paludis/resolver/sanitised_dependencies.cc17
1 files changed, 7 insertions, 10 deletions
diff --git a/paludis/resolver/sanitised_dependencies.cc b/paludis/resolver/sanitised_dependencies.cc
index 1954c0ad5..0ac5969d6 100644
--- a/paludis/resolver/sanitised_dependencies.cc
+++ b/paludis/resolver/sanitised_dependencies.cc
@@ -274,15 +274,14 @@ namespace
std::pair<AnyChildScore, OperatorScore> worst_score(acs_better_than_best, os_better_than_best);
/* score of a group is the score of the worst child. */
- for (std::list<PackageOrBlockDepSpec>::const_iterator h(g->begin()), h_end(g->end()) ;
- h != h_end ; ++h)
+ for (const auto & h : *g)
{
- auto s(maybe_make_sanitised(PackageOrBlockDepSpec(*h)));
+ auto s(maybe_make_sanitised(PackageOrBlockDepSpec(h)));
if (s)
{
auto score(decider.find_any_score(our_resolution, our_id, *s));
Log::get_instance()->message("resolver.sanitised_dependencies.any_score", ll_debug, lc_context)
- << "Scored " << *h << " as " << score.first << " " << score.second;
+ << "Scored " << h << " as " << score.first << " " << score.second;
if (score < worst_score)
worst_score = score;
@@ -299,10 +298,9 @@ namespace
if (g_best != child_groups.end())
{
/* might be nothing to do, if no labels are enabled */
- for (std::list<PackageOrBlockDepSpec>::const_iterator h(g_best->begin()), h_end(g_best->end()) ;
- h != h_end ; ++h)
+ for (const auto & h : *g_best)
{
- auto s(maybe_make_sanitised(*h));
+ auto s(maybe_make_sanitised(h));
if (s)
apply(*s);
}
@@ -370,9 +368,8 @@ namespace
auto classifier(classifier_builder->create());
if (classifier->any_enabled)
{
- for (auto c(conditions_stack.begin()), c_end(conditions_stack.end()) ;
- c != c_end ; ++c)
- acs << (acs.str().empty() ? "" : ", ") << stringify(*c);
+ for (auto & c : conditions_stack)
+ acs << (acs.str().empty() ? "" : ", ") << stringify(c);
return make_shared_copy(make_named_values<SanitisedDependency>(
n::active_conditions_as_string() = acs.str(),