diff options
author | Henry Wilson <m3henry@googlemail.com> | 2018-09-21 22:45:44 +0100 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2019-03-26 20:15:57 +0000 |
commit | 9cba6f71936207f11ad0d4ed752d82966087fab9 (patch) | |
tree | d36afb33bb2e40118ed7fd7dc5c68fb70e5373f3 /src/vehiclelist.cpp | |
parent | bfd79e59dc34314a089a0024af56d04d84456ebd (diff) | |
download | openttd-9cba6f71936207f11ad0d4ed752d82966087fab9.tar.xz |
Codechange: Replaced SmallVector::Compact() with std::vector::shrink_to_fit()
Diffstat (limited to 'src/vehiclelist.cpp')
-rw-r--r-- | src/vehiclelist.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |