Codechange: range based for loops instead of C-style for loops

This commit is contained in:
Rubidium
2024-04-09 17:18:35 +02:00
committed by rubidium42
parent 2587a21400
commit 4f2412a272
19 changed files with 65 additions and 66 deletions

View File

@@ -86,9 +86,9 @@ void LinkGraphSchedule::JoinNext()
*/
/* static */ void LinkGraphSchedule::Run(LinkGraphJob *job)
{
for (uint i = 0; i < lengthof(instance.handlers); ++i) {
for (const auto &handler : instance.handlers) {
if (job->IsJobAborted()) return;
instance.handlers[i]->Run(*job);
handler->Run(*job);
}
/*
@@ -157,8 +157,8 @@ LinkGraphSchedule::LinkGraphSchedule()
LinkGraphSchedule::~LinkGraphSchedule()
{
this->Clear();
for (uint i = 0; i < lengthof(this->handlers); ++i) {
delete this->handlers[i];
for (const auto &handler : this->handlers) {
delete handler;
}
}