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

@@ -40,8 +40,7 @@ static void UpdateWaypointOrder(Order *o)
void MoveBuoysToWaypoints()
{
/* Buoy orders become waypoint orders */
OrderList *ol;
FOR_ALL_ORDER_LISTS(ol) {
for (OrderList *ol : OrderList::Iterate()) {
VehicleType vt = ol->GetFirstSharedVehicle()->type;
if (vt != VEH_SHIP && vt != VEH_TRAIN) continue;