From 9cba6f71936207f11ad0d4ed752d82966087fab9 Mon Sep 17 00:00:00 2001 From: Henry Wilson Date: Fri, 21 Sep 2018 22:45:44 +0100 Subject: Codechange: Replaced SmallVector::Compact() with std::vector::shrink_to_fit() --- src/vehiclelist.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/vehiclelist.cpp') diff --git a/src/vehiclelist.cpp b/src/vehiclelist.cpp index 402226268..39ec90e8b 100644 --- a/src/vehiclelist.cpp +++ b/src/vehiclelist.cpp @@ -103,8 +103,8 @@ void BuildDepotVehicleList(VehicleType type, TileIndex tile, VehicleList *engine /* Ensure the lists are not wasting too much space. If the lists are fresh * (i.e. built within a command) then this will actually do nothing. */ - engines->Compact(); - if (wagons != NULL && wagons != engines) wagons->Compact(); + engines->shrink_to_fit(); + if (wagons != NULL && wagons != engines) wagons->shrink_to_fit(); } /** @@ -184,6 +184,6 @@ bool GenerateVehicleSortList(VehicleList *list, const VehicleListIdentifier &vli default: return false; } - list->Compact(); + list->shrink_to_fit(); return true; } -- cgit v1.2.3-54-g00ecf