Codechange: Replace order related FOR_ALL with range-based for loops

This commit is contained in:
glx
2019-12-17 01:35:29 +01:00
committed by Niels Martin Hansen
parent 41232f18c1
commit 9892d90b26
8 changed files with 27 additions and 73 deletions

View File

@@ -130,8 +130,7 @@ void MoveWaypointsToBaseStations()
}
/* Update the orders of vehicles */
OrderList *ol;
FOR_ALL_ORDER_LISTS(ol) {
for (OrderList *ol : OrderList::Iterate()) {
if (ol->GetFirstSharedVehicle()->type != VEH_TRAIN) continue;
for (Order *o = ol->GetFirstOrder(); o != nullptr; o = o->next) UpdateWaypointOrder(o);