summaryrefslogtreecommitdiff
path: root/src/station_cmd.cpp
diff options
context:
space:
mode:
authorHenry Wilson <m3henry@googlemail.com>2019-02-17 11:20:52 +0000
committerPeterN <peter@fuzzle.org>2019-03-26 20:15:57 +0000
commitab711e6942757d775c08c31a6c32d488feba1dba (patch)
treed102dc6d0e6b9c33e7205b63e3360ebd720a3ebb /src/station_cmd.cpp
parent297fd3dda3abe353ebe2fe77c67b011e24d403bc (diff)
downloadopenttd-ab711e6942757d775c08c31a6c32d488feba1dba.tar.xz
Codechange: Replaced SmallVector::[Begin|End]() with std alternatives
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 6811290ad..63e3384b0 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -1622,8 +1622,7 @@ CommandCost RemoveFromRailBaseStation(TileArea ta, SmallVector<T *, 4> &affected
if (quantity == 0) return error.Failed() ? error : CommandCost(STR_ERROR_THERE_IS_NO_STATION);
- for (T **stp = affected_stations.Begin(); stp != affected_stations.End(); stp++) {
- T *st = *stp;
+ for (T *st : affected_stations) {
/* now we need to make the "spanned" area of the railway station smaller
* if we deleted something at the edges.
@@ -1667,8 +1666,7 @@ CommandCost CmdRemoveFromRailStation(TileIndex start, DoCommandFlag flags, uint3
if (ret.Failed()) return ret;
/* Do all station specific functions here. */
- for (Station **stp = affected_stations.Begin(); stp != affected_stations.End(); stp++) {
- Station *st = *stp;
+ for (Station *st : affected_stations) {
if (st->train_station.tile == INVALID_TILE) SetWindowWidgetDirty(WC_STATION_VIEW, st->index, WID_SV_TRAINS);
st->MarkTilesDirty(false);