Merge branch 'master' into jgrpp
# Conflicts: # src/autoreplace_cmd.cpp # src/build_vehicle_gui.cpp # src/cargotype.cpp # src/economy.cpp # src/engine_gui.cpp # src/industry_cmd.cpp # src/industry_gui.cpp # src/linkgraph/linkgraph_gui.h # src/linkgraph/refresh.cpp # src/linkgraph/refresh.h # src/newgrf.cpp # src/newgrf_airporttiles.h # src/newgrf_roadstop.cpp # src/newgrf_station.cpp # src/newgrf_station.h # src/order_base.h # src/order_cmd.cpp # src/order_func.h # src/order_gui.cpp # src/pathfinder/pathfinder_type.h # src/saveload/afterload.cpp # src/subsidy_base.h # src/vehicle_cmd.cpp # src/vehicle_gui.cpp # src/vehicle_gui_base.h
This commit is contained in:
@@ -110,16 +110,16 @@ void BuildDepotVehicleList(VehicleType type, TileIndex tile, VehicleList *engine
|
||||
/** Cargo filter functions */
|
||||
bool VehicleCargoFilter(const Vehicle *v, const CargoID cid)
|
||||
{
|
||||
if (cid == CF_ANY) {
|
||||
if (cid == CargoFilterCriteria::CF_ANY) {
|
||||
return true;
|
||||
} else if (cid == CF_NONE) {
|
||||
} else if (cid == CargoFilterCriteria::CF_NONE) {
|
||||
for (const Vehicle *w = v; w != nullptr; w = w->Next()) {
|
||||
if (w->cargo_cap > 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} else if (cid == CF_FREIGHT) {
|
||||
} else if (cid == CargoFilterCriteria::CF_FREIGHT) {
|
||||
bool have_capacity = false;
|
||||
for (const Vehicle *w = v; w != nullptr; w = w->Next()) {
|
||||
if (w->cargo_cap) {
|
||||
@@ -152,7 +152,7 @@ bool GenerateVehicleSortList(VehicleList *list, const VehicleListIdentifier &vli
|
||||
list->clear();
|
||||
|
||||
auto add_veh = [&](const Vehicle *v) {
|
||||
if (cid == CF_ANY || VehicleCargoFilter(v, cid)) list->push_back(v);
|
||||
if (cid == CargoFilterCriteria::CF_ANY || VehicleCargoFilter(v, cid)) list->push_back(v);
|
||||
};
|
||||
|
||||
auto fill_all_vehicles = [&]() {
|
||||
|
Reference in New Issue
Block a user