summaryrefslogtreecommitdiff
path: root/src/newgrf.cpp
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2020-12-27 10:44:22 +0000
committerCharles Pigott <charlespigott@googlemail.com>2020-12-27 10:55:42 +0000
commit860c270c73048b4930ac8cbebcd60be746eb9782 (patch)
treea88a8acb208cf426ae8fac05dda202c57b59426a /src/newgrf.cpp
parent395a5d9991b500c681ff384f8d3b4e153e687abb (diff)
downloadopenttd-860c270c73048b4930ac8cbebcd60be746eb9782.tar.xz
Codechange: Replace assert_compile macro with static_assert
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r--src/newgrf.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 097e68ae2..2663a3470 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -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;