Codechange: Replaced SmallVector::[Begin|End]() with std alternatives
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user