Codechange: Replace assert_compile macro with static_assert
This commit is contained in:
@@ -503,7 +503,7 @@ static StringID TTDPStringIDToOTTDStringIDMapping(StringID str)
|
||||
assert(!IsInsideMM(str, 0xD000, 0xD7FF));
|
||||
|
||||
#define TEXTID_TO_STRINGID(begin, end, stringid, stringend) \
|
||||
assert_compile(stringend - stringid == end - begin); \
|
||||
static_assert(stringend - stringid == end - begin); \
|
||||
if (str >= begin && str <= end) return str + (stringid - begin)
|
||||
|
||||
/* We have some changes in our cargo strings, resulting in some missing. */
|
||||
@@ -8728,7 +8728,7 @@ GRFFile::GRFFile(const GRFConfig *config)
|
||||
|
||||
/* Copy the initial parameter list
|
||||
* 'Uninitialised' parameters are zeroed as that is their default value when dynamically creating them. */
|
||||
assert_compile(lengthof(this->param) == lengthof(config->param) && lengthof(this->param) == 0x80);
|
||||
static_assert(lengthof(this->param) == lengthof(config->param) && lengthof(this->param) == 0x80);
|
||||
|
||||
assert(config->num_params <= lengthof(config->param));
|
||||
this->param_end = config->num_params;
|
||||
|
Reference in New Issue
Block a user