aboutsummaryrefslogtreecommitdiff
path: root/src/clients/cave/resolve_common.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 /src/clients/cave/resolve_common.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 'src/clients/cave/resolve_common.cc')
-rw-r--r--src/clients/cave/resolve_common.cc17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/clients/cave/resolve_common.cc b/src/clients/cave/resolve_common.cc
index fe1cb8f51..830cf444c 100644
--- a/src/clients/cave/resolve_common.cc
+++ b/src/clients/cave/resolve_common.cc
@@ -608,25 +608,24 @@ namespace
std::cout << "Dumping restarts:" << std::endl << std::endl;
- for (std::list<SuggestRestart>::const_iterator r(restarts.begin()), r_end(restarts.end()) ;
- r != r_end ; ++r)
+ for (const auto & restart : restarts)
{
- std::cout << "* " << r->resolvent() << std::endl;
+ std::cout << "* " << restart.resolvent() << std::endl;
std::cout << " Had decided upon ";
- auto c(get_decided_id_or_null(r->previous_decision()));
+ auto c(get_decided_id_or_null(restart.previous_decision()));
if (c)
std::cout << *c;
else
- std::cout << r->previous_decision()->accept_returning<std::string>(KindNameVisitor());
+ std::cout << restart.previous_decision()->accept_returning<std::string>(KindNameVisitor());
std::cout << std::endl;
- std::cout << " Which did not satisfy " << r->problematic_constraint()->spec()
- << ", use existing " << r->problematic_constraint()->use_existing();
- if (r->problematic_constraint()->nothing_is_fine_too())
+ std::cout << " Which did not satisfy " << restart.problematic_constraint()->spec()
+ << ", use existing " << restart.problematic_constraint()->use_existing();
+ if (restart.problematic_constraint()->nothing_is_fine_too())
std::cout << ", nothing is fine too";
- std::cout << " " << r->problematic_constraint()->reason()->accept_returning<std::string>(ShortReasonName());
+ std::cout << " " << restart.problematic_constraint()->reason()->accept_returning<std::string>(ShortReasonName());
std::cout << std::endl;
}