diff --git a/src/order_backup.cpp b/src/order_backup.cpp --- a/src/order_backup.cpp +++ b/src/order_backup.cpp @@ -56,8 +56,7 @@ OrderBackup::OrderBackup(const Vehicle * Order **tail = &this->orders; /* Count the number of orders */ - const Order *order; - FOR_VEHICLE_ORDERS(v, order) { + for (const Order *order : v->Orders()) { Order *copy = new Order(); copy->AssignOrder(*order); *tail = copy;