Codechange: Replace FOR_ALL_ENGINE_RENEWS with range-based for loops

This commit is contained in:
glx
2019-12-15 17:10:46 +01:00
committed by Niels Martin Hansen
parent ddabfed1cd
commit 60e3cf8aff
3 changed files with 3 additions and 11 deletions

View File

@@ -384,10 +384,9 @@ CommandCost CmdDeleteGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
/* If we set an autoreplace for the group we delete, remove it. */
if (_current_company < MAX_COMPANIES) {
Company *c;
EngineRenew *er;
c = Company::Get(_current_company);
FOR_ALL_ENGINE_RENEWS(er) {
for (EngineRenew *er : EngineRenew::Iterate()) {
if (er->group_id == g->index) RemoveEngineReplacementForCompany(c, er->from, g->index, flags);
}
}