* Get flow for a station. * @param st Station to get flow for. * @return Flow for st. */
| 4984 | * @return Flow for st. |
| 4985 | */ |
| 4986 | uint FlowStat::GetShare(StationID st) const |
| 4987 | { |
| 4988 | uint32_t prev = 0; |
| 4989 | for (const auto &it : this->shares) { |
| 4990 | if (it.second == st) { |
| 4991 | return it.first - prev; |
| 4992 | } else { |
| 4993 | prev = it.first; |
| 4994 | } |
| 4995 | } |
| 4996 | return 0; |
| 4997 | } |
| 4998 | |
| 4999 | /** |
| 5000 | * Get a station a package can be routed to, but exclude the given ones. |
no outgoing calls
no test coverage detected