summaryrefslogtreecommitdiff
path: root/src/station_cmd.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2019-02-24 18:52:15 +0000
committerPeterN <peter@fuzzle.org>2019-03-09 16:33:47 +0000
commited6084523d546641d4ec9ff5f560387d7c40670f (patch)
treeec96379c0b76df7b6da28e4c33e16ed7d72eef3e /src/station_cmd.cpp
parent46aca9377b01a6626a972151e6fc4c62eec76ba7 (diff)
downloadopenttd-ed6084523d546641d4ec9ff5f560387d7c40670f.tar.xz
Codechange: Convert StationList from SmallVector to std::set.
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r--src/station_cmd.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index a9460e562..5218a75e9 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -3839,7 +3839,7 @@ void FindStationsAroundTiles(const TileArea &location, StationList *stations)
/* Insert the station in the set. This will fail if it has
* already been added.
*/
- stations->Include(st);
+ stations->insert(st);
}
}
}
@@ -3867,9 +3867,7 @@ uint MoveGoodsToStation(CargoID type, uint amount, SourceType source_type, Sourc
uint best_rating1 = 0; // rating of st1
uint best_rating2 = 0; // rating of st2
- for (Station * const *st_iter = all_stations->Begin(); st_iter != all_stations->End(); ++st_iter) {
- Station *st = *st_iter;
-
+ for (Station *st : *all_stations) {
/* Is the station reserved exclusively for somebody else? */
if (st->owner != OWNER_NONE && st->town->exclusive_counter > 0 && st->town->exclusivity != st->owner) continue;