diff options
author | Jonathan G Rennison <j.g.rennison@gmail.com> | 2016-09-05 01:15:09 +0100 |
---|---|---|
committer | Charles Pigott <charlespigott@googlemail.com> | 2020-12-27 10:30:55 +0000 |
commit | eb74179c6d66921d2946e4a93e41a5de0af4a4ac (patch) | |
tree | 385251422b321833b489a58ec813bb4376024bd2 | |
parent | 52f3abba6ef2e5a69b58cf71fdcdaa75d603b062 (diff) | |
download | openttd-eb74179c6d66921d2946e4a93e41a5de0af4a4ac.tar.xz |
Codechange: Unconditionally use static_assert
We're well past having to support non-C++11 compliant compilers now.
-rw-r--r-- | src/stdafx.h | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/stdafx.h b/src/stdafx.h index 5b9281a28..9b9f4c6a9 100644 --- a/src/stdafx.h +++ b/src/stdafx.h @@ -348,15 +348,7 @@ typedef unsigned char byte; # define PERSONAL_DIR "" #endif -/* Compile time assertions. Prefer c++0x static_assert(). */ -#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600) -# define assert_compile(expr) static_assert(expr, #expr ) -#elif defined(__OS2__) - /* Disabled for OS/2 */ -# define assert_compile(expr) -#else -# define assert_compile(expr) typedef int __ct_assert__[1 - 2 * !(expr)] -#endif +#define assert_compile(expr) static_assert(expr, #expr) /* Check if the types have the bitsizes like we are using them */ assert_compile(sizeof(uint64) == 8); |