10#ifndef VEHICLELIST_FUNC_H
11#define VEHICLELIST_FUNC_H
23template <
class VehiclePredicate,
class OrderPredicate,
class VehicleFunc>
29 Vehicle *v = orderlist->GetFirstSharedVehicle();
30 if (!veh_pred(v))
continue;
33 for (
const Order &order : orderlist->GetOrders()) {
35 if (!ord_pred(&order))
continue;
Shared order list linking together the linked list of orders and the list of vehicles sharing this or...
If you change this, keep in mind that it is also saved in 2 other places:
static Pool::IterateWrapper< OrderList > Iterate(size_t from=0)
Vehicle * NextShared() const
Get the next vehicle of the shared vehicle chain.
Base class for all vehicles.
void FindVehiclesWithOrder(VehiclePredicate veh_pred, OrderPredicate ord_pred, VehicleFunc veh_func)
Find vehicles matching an order.