| 900 | } |
| 901 | |
| 902 | static void sortVehicleList(Window& self) |
| 903 | { |
| 904 | auto list = std::span<EntityId>(reinterpret_cast<EntityId*>(self.rowInfo), self.rowCount); |
| 905 | |
| 906 | std::sort(list.begin(), list.end(), [self](EntityId lhs, EntityId rhs) { |
| 907 | auto* lhsVehicle = EntityManager::get<VehicleHead>(lhs); |
| 908 | auto* rhsVehicle = EntityManager::get<VehicleHead>(rhs); |
| 909 | return orderByName(*lhsVehicle, *rhsVehicle); |
| 910 | }); |
| 911 | |
| 912 | self.invalidate(); |
| 913 | } |
| 914 | |
| 915 | void removeTrainFromList(Window& self, EntityId head) |
| 916 | { |
no test coverage detected