forked from mirror/OpenTTD
Codechange: Replace assert_compile macro with static_assert
This commit is contained in:
@@ -1877,7 +1877,7 @@ CommandCost CmdFoundTown(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
|
||||
static const byte price_mult[][TSZ_RANDOM + 1] = {{ 15, 25, 40, 25 }, { 20, 35, 55, 35 }};
|
||||
/* multidimensional arrays have to have defined length of non-first dimension */
|
||||
assert_compile(lengthof(price_mult[0]) == 4);
|
||||
static_assert(lengthof(price_mult[0]) == 4);
|
||||
|
||||
CommandCost cost(EXPENSES_OTHER, _price[PR_BUILD_TOWN]);
|
||||
byte mult = price_mult[city][size];
|
||||
|
Reference in New Issue
Block a user