summaryrefslogtreecommitdiff
path: root/src/industry_gui.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/industry_gui.cpp
parent395a5d9991b500c681ff384f8d3b4e153e687abb (diff)
downloadopenttd-860c270c73048b4930ac8cbebcd60be746eb9782.tar.xz
Codechange: Replace assert_compile macro with static_assert
Diffstat (limited to 'src/industry_gui.cpp')
-rw-r--r--src/industry_gui.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp
index caa18c8e3..ed770ed04 100644
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -145,7 +145,7 @@ enum CargoSuffixInOut {
template <typename TC, typename TS>
static inline void GetAllCargoSuffixes(CargoSuffixInOut use_input, CargoSuffixType cst, const Industry *ind, IndustryType ind_type, const IndustrySpec *indspec, const TC &cargoes, TS &suffixes)
{
- assert_compile(lengthof(cargoes) <= lengthof(suffixes));
+ static_assert(lengthof(cargoes) <= lengthof(suffixes));
if (indspec->behaviour & INDUSTRYBEH_CARGOTYPES_UNLIMITED) {
/* Reworked behaviour with new many-in-many-out scheme */
@@ -2201,8 +2201,8 @@ private:
}
};
-assert_compile(MAX_CARGOES >= cpp_lengthof(IndustrySpec, produced_cargo));
-assert_compile(MAX_CARGOES >= cpp_lengthof(IndustrySpec, accepts_cargo));
+static_assert(MAX_CARGOES >= cpp_lengthof(IndustrySpec, produced_cargo));
+static_assert(MAX_CARGOES >= cpp_lengthof(IndustrySpec, accepts_cargo));
int CargoesField::small_height; ///< Height of the header row.
int CargoesField::normal_height; ///< Height of the non-header rows.