* Get a mask of the cargo types that are empty at the station. * @param st Station to query * @return the empty mask */
| 502 | * @return the empty mask |
| 503 | */ |
| 504 | CargoTypes GetEmptyMask(const Station *st) |
| 505 | { |
| 506 | CargoTypes mask = 0; |
| 507 | |
| 508 | for (auto it = std::begin(st->goods); it != std::end(st->goods); ++it) { |
| 509 | if (it->TotalCount() == 0) SetBit(mask, std::distance(std::begin(st->goods), it)); |
| 510 | } |
| 511 | return mask; |
| 512 | } |
| 513 | |
| 514 | /** |
| 515 | * Add news item for when a station changes which cargoes it accepts. |
no test coverage detected