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

@@ -2438,7 +2438,7 @@ struct CompanyWindow : Window
if (amounts[0] + amounts[1] + amounts[2] + amounts[3] == 0) {
DrawString(r.left, r.right, y, STR_COMPANY_VIEW_VEHICLES_NONE);
} else {
assert_compile(lengthof(amounts) == lengthof(_company_view_vehicle_count_strings));
static_assert(lengthof(amounts) == lengthof(_company_view_vehicle_count_strings));
for (uint i = 0; i < lengthof(amounts); i++) {
if (amounts[i] != 0) {