Codechange: Use unique ptrs for NewGRF specs.

This commit is contained in:
Peter Nelson
2023-04-15 21:30:37 +01:00
committed by PeterN
parent ef6b307465
commit 7b0797d1cd
2 changed files with 77 additions and 122 deletions

View File

@@ -112,14 +112,14 @@ struct GRFFile : ZeroedMemoryAllocator {
uint sound_offset;
uint16 num_sounds;
std::vector<struct StationSpec *> stations;
std::vector<struct HouseSpec *> housespec;
std::vector<struct IndustrySpec *> industryspec;
std::vector<struct IndustryTileSpec *> indtspec;
std::vector<struct ObjectSpec *> objectspec;
std::vector<struct AirportSpec *> airportspec;
std::vector<struct AirportTileSpec *> airtspec;
std::vector<struct RoadStopSpec *> roadstops;
std::vector<std::unique_ptr<struct StationSpec>> stations;
std::vector<std::unique_ptr<struct HouseSpec>> housespec;
std::vector<std::unique_ptr<struct IndustrySpec>> industryspec;
std::vector<std::unique_ptr<struct IndustryTileSpec>> indtspec;
std::vector<std::unique_ptr<struct ObjectSpec>> objectspec;
std::vector<std::unique_ptr<struct AirportSpec>> airportspec;
std::vector<std::unique_ptr<struct AirportTileSpec>> airtspec;
std::vector<std::unique_ptr<struct RoadStopSpec>> roadstops;
uint32 param[0x80];
uint param_end; ///< one more than the highest set parameter