summaryrefslogtreecommitdiff
path: root/src/order_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/order_gui.cpp')
-rw-r--r--src/order_gui.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/order_gui.cpp b/src/order_gui.cpp
index 4edf994f7..5529a8331 100644
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -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++;
}