File diff r24512:4a1407ed9784 → r24513:ba5551156e4e
src/vehiclelist.cpp
Show inline comments
 
@@ -115,15 +115,13 @@ bool GenerateVehicleSortList(VehicleList
 
	list->clear();
 

	
 
	switch (vli.type) {
 
		case VL_STATION_LIST:
 
			for (const Vehicle *v : Vehicle::Iterate()) {
 
				if (v->type == vli.vtype && v->IsPrimaryVehicle()) {
 
					const Order *order;
 

	
 
					FOR_VEHICLE_ORDERS(v, order) {
 
					for (const Order *order : v->Orders()) {
 
						if ((order->IsType(OT_GOTO_STATION) || order->IsType(OT_GOTO_WAYPOINT) || order->IsType(OT_IMPLICIT))
 
								&& order->GetDestination() == vli.index) {
 
							list->push_back(v);
 
							break;
 
						}
 
					}
 
@@ -162,15 +160,13 @@ bool GenerateVehicleSortList(VehicleList
 
			}
 
			break;
 

	
 
		case VL_DEPOT_LIST:
 
			for (const Vehicle *v : Vehicle::Iterate()) {
 
				if (v->type == vli.vtype && v->IsPrimaryVehicle()) {
 
					const Order *order;
 

	
 
					FOR_VEHICLE_ORDERS(v, order) {
 
					for (const Order *order : v->Orders()) {
 
						if (order->IsType(OT_GOTO_DEPOT) && !(order->GetDepotActionType() & ODATFB_NEAREST_DEPOT) && order->GetDestination() == vli.index) {
 
							list->push_back(v);
 
							break;
 
						}
 
					}
 
				}