Codechange: Replace FOR_ALL_GROUPS with range-based for loops

This commit is contained in:
glx
2019-12-16 18:01:57 +01:00
committed by Niels Martin Hansen
parent f58ce3db19
commit 4ae829cb27
8 changed files with 18 additions and 41 deletions

View File

@@ -410,8 +410,7 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner)
if (new_owner == INVALID_OWNER) {
RemoveAllGroupsForCompany(old_owner);
} else {
Group *g;
FOR_ALL_GROUPS(g) {
for (Group *g : Group::Iterate()) {
if (g->owner == old_owner) g->owner = new_owner;
}
}