Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back()

This commit is contained in:
Henry Wilson
2019-02-18 22:39:06 +00:00
committed by PeterN
parent ca2f33c6d0
commit a0f36a50e6
79 changed files with 402 additions and 403 deletions

View File

@@ -490,11 +490,12 @@ void EngineOverrideManager::ResetToDefaultMapping()
this->clear();
for (VehicleType type = VEH_TRAIN; type <= VEH_AIRCRAFT; type++) {
for (uint internal_id = 0; internal_id < _engine_counts[type]; internal_id++) {
EngineIDMapping *eid = this->Append();
eid->type = type;
eid->grfid = INVALID_GRFID;
eid->internal_id = internal_id;
eid->substitute_id = internal_id;
/*C++17: EngineIDMapping &eid = */ this->emplace_back();
EngineIDMapping &eid = this->back();
eid.type = type;
eid.grfid = INVALID_GRFID;
eid.internal_id = internal_id;
eid.substitute_id = internal_id;
}
}
}