Codechange: Use std::vector for station speclist

This removes manual memory allocation, although we still manage the list
size in roughly the same way.
This commit is contained in:
Peter Nelson
2022-11-05 22:48:45 +00:00
committed by Michael Lutz
parent 4dc741a8a0
commit 22803f997b
4 changed files with 28 additions and 42 deletions

View File

@@ -62,8 +62,7 @@ struct BaseStation : StationPool::PoolItem<&_station_pool> {
Owner owner; ///< The owner of this station
StationFacility facilities; ///< The facilities that this station has
uint8 num_specs; ///< Number of specs in the speclist
StationSpecList *speclist; ///< List of station specs of this station
std::vector<StationSpecList> speclist; ///< List of rail station specs of this station.
Date build_date; ///< Date of construction