Codechange: Replace FOR_ALL_GOALS with range-based for loops

This commit is contained in:
glx
2019-12-16 17:53:40 +01:00
committed by Niels Martin Hansen
parent 1f6b3a37f9
commit f58ce3db19
4 changed files with 7 additions and 16 deletions

View File

@@ -532,8 +532,7 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner)
}
/* Remove Game Script created Goals, CargoMonitors and Story pages. */
Goal *g;
FOR_ALL_GOALS(g) {
for (Goal *g : Goal::Iterate()) {
if (g->company == old_owner) delete g;
}