MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetFlowVia

Method GetFlowVia

src/station_cmd.cpp:5332–5339  ·  view source on GitHub ↗

* Get the sum of flows via a specific station from this FlowStatMap. * @param via Remote station to look for. * @return all flows for 'via' added up. */

Source from the content-addressed store, hash-verified

5330 * @return all flows for 'via' added up.
5331 */
5332uint FlowStatMap::GetFlowVia(StationID via) const
5333{
5334 uint ret = 0;
5335 for (const auto &it : *this) {
5336 ret += it.second.GetShare(via);
5337 }
5338 return ret;
5339}
5340
5341/**
5342 * Get the sum of flows from a specific station from this FlowStatMap.

Callers 2

AddLinksMethod · 0.80
CountCargoPlannedMethod · 0.80

Calls 1

GetShareMethod · 0.80

Tested by

no test coverage detected