Codechange: Replace FOR_VEHICLE_ORDERS with range-based for loops

This commit is contained in:
glx22
2020-12-27 00:13:56 +01:00
committed by Charles Pigott
parent 1478fa93b3
commit d8605ad18d
11 changed files with 69 additions and 48 deletions

View File

@@ -793,8 +793,7 @@ public:
if (_settings_client.gui.quick_goto && v->owner == _local_company) {
/* If there are less than 2 station, make Go To active. */
int station_orders = 0;
const Order *order;
FOR_VEHICLE_ORDERS(v, order) {
for(const Order *order : v->Orders()) {
if (order->IsType(OT_GOTO_STATION)) station_orders++;
}