summaryrefslogtreecommitdiff
path: root/src/vehicle.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/vehicle.cpp
parent297fd3dda3abe353ebe2fe77c67b011e24d403bc (diff)
downloadopenttd-ab711e6942757d775c08c31a6c32d488feba1dba.tar.xz
Codechange: Replaced SmallVector::[Begin|End]() with std alternatives
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r--src/vehicle.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index 267c20491..9f15d9be0 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -1028,15 +1028,15 @@ void CallVehicleTicks()
}
Backup<CompanyByte> cur_company(_current_company, FILE_LINE);
- for (AutoreplaceMap::iterator it = _vehicles_to_autoreplace.Begin(); it != _vehicles_to_autoreplace.End(); it++) {
- v = it->first;
+ for (auto &it : _vehicles_to_autoreplace) {
+ v = it.first;
/* Autoreplace needs the current company set as the vehicle owner */
cur_company.Change(v->owner);
/* Start vehicle if we stopped them in VehicleEnteredDepotThisTick()
* We need to stop them between VehicleEnteredDepotThisTick() and here or we risk that
* they are already leaving the depot again before being replaced. */
- if (it->second) v->vehstatus &= ~VS_STOPPED;
+ if (it.second) v->vehstatus &= ~VS_STOPPED;
/* Store the position of the effect as the vehicle pointer will become invalid later */
int x = v->x_pos;