diff options
author | peterbell10 <peterbell10@live.co.uk> | 2017-07-20 17:51:26 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2017-07-21 15:41:51 +0200 |
commit | 502b726a7b4ac0bafd65a56e2c441e2506258a97 (patch) | |
tree | 4eb37d78a60693576c6f83dc0ba2937b4fc4af1a /src/Globals.h | |
parent | Remove stricmp macro in favour of NoCaseCompare (diff) | |
download | cuberite-502b726a7b4ac0bafd65a56e2c441e2506258a97.tar cuberite-502b726a7b4ac0bafd65a56e2c441e2506258a97.tar.gz cuberite-502b726a7b4ac0bafd65a56e2c441e2506258a97.tar.bz2 cuberite-502b726a7b4ac0bafd65a56e2c441e2506258a97.tar.lz cuberite-502b726a7b4ac0bafd65a56e2c441e2506258a97.tar.xz cuberite-502b726a7b4ac0bafd65a56e2c441e2506258a97.tar.zst cuberite-502b726a7b4ac0bafd65a56e2c441e2506258a97.zip |
Diffstat (limited to 'src/Globals.h')
-rw-r--r-- | src/Globals.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/Globals.h b/src/Globals.h index 13e793259..3b6575860 100644 --- a/src/Globals.h +++ b/src/Globals.h @@ -145,14 +145,10 @@ typedef unsigned char Byte; typedef Byte ColourID; -// If you get an error about specialization check the size of integral types -template <typename T, size_t Size, bool x = sizeof(T) == Size> -class SizeChecker; - template <typename T, size_t Size> -class SizeChecker<T, Size, true> +class SizeChecker { - T v; + static_assert(sizeof(T) == Size, "Check the size of integral types"); }; template class SizeChecker<Int64, 8>; |