Make MSVC use C11's `static_assert`

This commit is contained in:
wolfreak99 2017-02-17 23:44:50 +01:00 committed by Michał Janiszewski
parent 7d1f86bb51
commit 77c08837f4
1 changed files with 0 additions and 9 deletions

View File

@ -220,16 +220,7 @@ typedef uint16 rct_string_id;
#define RESTRICT
#endif
#ifdef __cplusplus
#define assert_struct_size(x, y) static_assert(sizeof(x) == (y), "Improper struct size")
#else
// Visual Studio does not know _Static_assert
#if !defined(_MSC_VER)
#define assert_struct_size(x, y) _Static_assert(sizeof(x) == (y), "Improper struct size")
#else
#define assert_struct_size(x, y)
#endif // !defined(_MSC_VER)
#endif
#ifdef PLATFORM_X86
#ifndef FASTCALL