From 502b726a7b4ac0bafd65a56e2c441e2506258a97 Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Thu, 20 Jul 2017 16:51:26 +0100 Subject: [PATCH] Simplify SizeCheck --- src/Globals.h | 8 ++------ 1 file 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 -class SizeChecker; - template -class SizeChecker +class SizeChecker { - T v; + static_assert(sizeof(T) == Size, "Check the size of integral types"); }; template class SizeChecker;