summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
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;