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

@@ -48,8 +48,8 @@ enum CargoCompanyBits {
CCB_COMPANY_LENGTH = 4, ///< Number of bits of the company field.
};
assert_compile(NUM_CARGO <= (1 << CCB_CARGO_TYPE_LENGTH));
assert_compile(MAX_COMPANIES <= (1 << CCB_COMPANY_LENGTH));
static_assert(NUM_CARGO <= (1 << CCB_CARGO_TYPE_LENGTH));
static_assert(MAX_COMPANIES <= (1 << CCB_COMPANY_LENGTH));
/**