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

Method GetFlow

src/station_cmd.cpp:5318–5325  ·  view source on GitHub ↗

* Get the sum of all flows from this FlowStatMap. * @return sum of all flows. */

Source from the content-addressed store, hash-verified

5316 * @return sum of all flows.
5317 */
5318uint FlowStatMap::GetFlow() const
5319{
5320 uint ret = 0;
5321 for (const auto &it : *this) {
5322 ret += (--(it.second.GetShares()->end()))->first;
5323 }
5324 return ret;
5325}
5326
5327/**
5328 * Get the sum of flows via a specific station from this FlowStatMap.

Callers

nothing calls this directly

Calls 2

GetSharesMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected