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

Method GetFlowFrom

src/station_cmd.cpp:5346–5351  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

5344 * @return all flows from 'from' added up.
5345 */
5346uint FlowStatMap::GetFlowFrom(StationID from) const
5347{
5348 FlowStatMap::const_iterator i = this->find(from);
5349 if (i == this->end()) return 0;
5350 return (--(i->second.GetShares()->end()))->first;
5351}
5352
5353/**
5354 * Get the flow from a specific station via a specific other station.

Callers 1

CountCargoPlannedMethod · 0.80

Calls 3

GetSharesMethod · 0.80
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected