Codechange: Replace assert_compile macro with static_assert

This commit is contained in:
Charles Pigott
2020-12-27 10:44:22 +00:00
parent 395a5d9991
commit 860c270c73
77 changed files with 133 additions and 135 deletions

View File

@@ -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];