1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-12 09:09:09 +00:00

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

@@ -1196,9 +1196,7 @@ static SmallVector<ListOrderChange, 16> _list_order_changes;
void AlterVehicleListOrder(EngineID engine, uint target)
{
/* Add the list order change to a queue */
ListOrderChange *loc = _list_order_changes.Append();
loc->engine = engine;
loc->target = target;
_list_order_changes.push_back({engine, target});
}
/**
@@ -1231,7 +1229,7 @@ void CommitVehicleListOrderChanges()
SmallVector<EngineID, 16> ordering;
Engine *e;
FOR_ALL_ENGINES(e) {
*ordering.Append() = e->index;
ordering.push_back(e->index);
}
QSortT(ordering.Begin(), ordering.size(), EnginePreSort);