aboutsummaryrefslogtreecommitdiff
path: root/paludis
diff options
context:
space:
mode:
authorAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2016-12-04 22:28:47 -0800
committerAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2016-12-04 23:16:41 -0800
commit36411977b0840f1c9dd34cb053eb48991d42cf2b (patch)
tree7200dba9dc9ba39d5172119bb31f7dde9a06f1d9 /paludis
parente74f4919aa0fd86cc835f21d091585737d80fe19 (diff)
downloadpaludis-36411977b0840f1c9dd34cb053eb48991d42cf2b.tar.gz
paludis-36411977b0840f1c9dd34cb053eb48991d42cf2b.tar.xz
resolver: more range loop conversions (NFC)
Diffstat (limited to 'paludis')
-rw-r--r--paludis/resolver/collect_depped_upon.cc12
-rw-r--r--paludis/resolver/get_constraints_for_dependent_helper.cc6
2 files changed, 7 insertions, 11 deletions
diff --git a/paludis/resolver/collect_depped_upon.cc b/paludis/resolver/collect_depped_upon.cc
index 1dbc7a382..13fcfad13 100644
--- a/paludis/resolver/collect_depped_upon.cc
+++ b/paludis/resolver/collect_depped_upon.cc
@@ -148,8 +148,7 @@ namespace
void visit(const DependencySpecTree::NodeType<PackageDepSpec>::Type & s)
{
- for (typename C_::ConstIterator g(going_away->begin()), g_end(going_away->end()) ;
- g != g_end ; ++g)
+ for (const auto & removing : *going_away)
{
auto spec(s.spec());
@@ -167,14 +166,13 @@ namespace
}
}
- if (! match_package(*env, *spec, dependent_checker_id(*g), id_for_specs, { }))
+ if (! match_package(*env, *spec, dependent_checker_id(removing), id_for_specs, { }))
continue;
bool any(false);
- for (typename C_::ConstIterator n(newly_available->begin()), n_end(newly_available->end()) ;
- n != n_end ; ++n)
+ for (const auto & installing : *newly_available)
{
- if (match_package(*env, *spec, dependent_checker_id(*n), id_for_specs, { }))
+ if (match_package(*env, *spec, dependent_checker_id(installing), id_for_specs, { }))
{
any = true;
break;
@@ -182,7 +180,7 @@ namespace
}
if (! any)
- result->push_back(ResultValueMaker<typename R_::value_type>::create(*g, *labels_stack.begin()));
+ result->push_back(ResultValueMaker<typename R_::value_type>::create(removing, *labels_stack.begin()));
}
}
diff --git a/paludis/resolver/get_constraints_for_dependent_helper.cc b/paludis/resolver/get_constraints_for_dependent_helper.cc
index 60dafebaf..fc6cff3e3 100644
--- a/paludis/resolver/get_constraints_for_dependent_helper.cc
+++ b/paludis/resolver/get_constraints_for_dependent_helper.cc
@@ -88,11 +88,9 @@ GetConstraintsForDependentHelper::operator() (
spec = std::make_shared<PackageDepSpec>(partial_spec);
}
- for (auto i(dependent_upon_ids->begin()), i_end(dependent_upon_ids->end()) ;
- i != i_end ; ++i)
+ for (const auto & dependent : *dependent_upon_ids)
{
- auto reason(std::make_shared<DependentReason>(*i));
-
+ auto reason(std::make_shared<DependentReason>(dependent));
result->push_back(std::make_shared<Constraint>(make_named_values<Constraint>(
n::destination_type() = dt_install_to_slash,
n::force_unable() = false,