From 75afa5898189f034b1ef9caf462236c10b667340 Mon Sep 17 00:00:00 2001 From: Koncord Date: Wed, 1 Feb 2017 13:42:58 +0800 Subject: [PATCH] [Server] Add bool type for scripts --- apps/openmw-mp/Script/Types.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/openmw-mp/Script/Types.hpp b/apps/openmw-mp/Script/Types.hpp index c1ca43010..84bb988d6 100644 --- a/apps/openmw-mp/Script/Types.hpp +++ b/apps/openmw-mp/Script/Types.hpp @@ -27,6 +27,7 @@ template<> struct sizeof_void { enum { value = 0 }; }; template struct TypeChar { static_assert(!t, "Unsupported type in variadic type list"); }; +template<> struct TypeChar { enum { value = 'b' }; }; template struct TypeChar { enum { value = 'p' }; }; template<> struct TypeChar { enum { value = 'd' }; }; template<> struct TypeChar { enum { value = 'n' }; }; @@ -40,6 +41,7 @@ template<> struct TypeChar { enum { value = 's template<> struct TypeChar::value> { enum { value = 'v' }; }; template struct CharType { static_assert(!t, "Unsupported type in variadic type list"); }; +template<> struct CharType<'b'> { typedef bool type; }; template<> struct CharType<'p'> { typedef void* type; }; template<> struct CharType<'d'> { typedef double* type; }; template<> struct CharType<'n'> { typedef RakNet::NetworkID** type; };