Codechange: Use range-for iteration.

This commit is contained in:
Peter Nelson
2023-05-07 12:09:54 +01:00
committed by PeterN
parent cef3a2570d
commit e6740046ee
22 changed files with 169 additions and 193 deletions

View File

@@ -110,8 +110,8 @@ void LinkGraphSchedule::JoinNext()
*/
void LinkGraphSchedule::SpawnAll()
{
for (JobList::iterator i = this->running.begin(); i != this->running.end(); ++i) {
(*i)->SpawnThread();
for (auto &it : this->running) {
it->SpawnThread();
}
}
@@ -120,8 +120,8 @@ void LinkGraphSchedule::SpawnAll()
*/
/* static */ void LinkGraphSchedule::Clear()
{
for (JobList::iterator i(instance.running.begin()); i != instance.running.end(); ++i) {
(*i)->AbortJob();
for (auto &it : instance.running) {
it->AbortJob();
}
instance.running.clear();
instance.schedule.clear();