mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-20 02:42:42 +01:00
Codechange: Remove StationIDStack and SmallStack.
Use a std::vector or std::span instead.
This commit is contained in:
committed by
Peter Nelson
parent
5c89dff677
commit
fd32d1447e
@@ -5200,14 +5200,14 @@ void FlowStatMap::FinalizeLocalConsumption(StationID self)
|
||||
* @return IDs of source stations for which the complete FlowStat, not only a
|
||||
* share, has been erased.
|
||||
*/
|
||||
StationIDStack FlowStatMap::DeleteFlows(StationID via)
|
||||
std::vector<StationID> FlowStatMap::DeleteFlows(StationID via)
|
||||
{
|
||||
StationIDStack ret;
|
||||
std::vector<StationID> ret;
|
||||
for (FlowStatMap::iterator f_it = this->begin(); f_it != this->end();) {
|
||||
FlowStat &s_flows = f_it->second;
|
||||
s_flows.ChangeShare(via, INT_MIN);
|
||||
if (s_flows.GetShares()->empty()) {
|
||||
ret.Push(f_it->first);
|
||||
ret.push_back(f_it->first);
|
||||
this->erase(f_it++);
|
||||
} else {
|
||||
++f_it;
|
||||
|
||||
Reference in New Issue
Block a user