Codechange: Use std::vector for industry tile layouts

This commit is contained in:
Niels Martin Hansen
2019-10-04 21:26:44 +02:00
committed by Charles Pigott
parent e5f1755629
commit 53f8d0b815
11 changed files with 272 additions and 355 deletions

View File

@@ -520,7 +520,7 @@ uint16 GetIndustryCallback(CallbackID callback, uint32 param1, uint32 param2, In
* @param creation_type The circumstances the industry is created under.
* @return Succeeded or failed command.
*/
CommandCost CheckIfCallBackAllowsCreation(TileIndex tile, IndustryType type, uint layout, uint32 seed, uint16 initial_random_bits, Owner founder, IndustryAvailabilityCallType creation_type)
CommandCost CheckIfCallBackAllowsCreation(TileIndex tile, IndustryType type, size_t layout, uint32 seed, uint16 initial_random_bits, Owner founder, IndustryAvailabilityCallType creation_type)
{
const IndustrySpec *indspec = GetIndustrySpec(type);
@@ -529,7 +529,7 @@ CommandCost CheckIfCallBackAllowsCreation(TileIndex tile, IndustryType type, uin
ind.location.tile = tile;
ind.location.w = 0; // important to mark the industry invalid
ind.type = type;
ind.selected_layout = layout;
ind.selected_layout = (byte)layout;
ind.town = ClosestTownFromTile(tile, UINT_MAX);
ind.random = initial_random_bits;
ind.founder = founder;