diff options
author | Henry Wilson <m3henry@googlemail.com> | 2019-02-18 22:39:06 +0000 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2019-03-26 20:15:57 +0000 |
commit | a0f36a50e6324f570985f5010eb0543ec0673aeb (patch) | |
tree | 09f9c9abd097acc244f80366da42cb8702c7ed19 /src/station_cmd.cpp | |
parent | ca2f33c6d025c0c45fb4bc472493290445312de5 (diff) | |
download | openttd-a0f36a50e6324f570985f5010eb0543ec0673aeb.tar.xz |
Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back()
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r-- | src/station_cmd.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 2dee09fe8..fcbf514bc 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -942,7 +942,7 @@ static CommandCost CheckFlatLandRailStation(TileArea tile_area, DoCommandFlag fl if (HasBit(GetRailReservationTrackBits(tile_cur), track)) { Train *v = GetTrainForReservation(tile_cur, track); if (v != NULL) { - *affected_vehicles.Append() = v; + affected_vehicles.push_back(v); } } CommandCost ret = DoCommand(tile_cur, 0, track, flags, CMD_REMOVE_SINGLE_RAIL); @@ -1386,7 +1386,7 @@ CommandCost CmdBuildRailStation(TileIndex tile_org, DoCommandFlag flags, uint32 /* Check for trains having a reservation for this tile. */ Train *v = GetTrainForReservation(tile, AxisToTrack(GetRailStationAxis(tile))); if (v != NULL) { - *affected_vehicles.Append() = v; + affected_vehicles.push_back(v); FreeTrainReservation(v); } } @@ -3538,7 +3538,7 @@ void DeleteStaleLinks(Station *from) } } if (!found_to || !found_from) continue; - *(vehicles.Append()) = l->GetFirstSharedVehicle(); + vehicles.push_back(l->GetFirstSharedVehicle()); } auto iter = vehicles.begin(); |