simplify
This commit is contained in:
@@ -159,7 +159,7 @@ static void Lua##X(lua_State* L) \
|
||||
Enum::SetMetatable( L, EnumTraits<X>::EnumToString, EnumTraits<X>::StringToEnum, #X ); \
|
||||
} \
|
||||
REGISTER_WITH_LUA_FUNCTION( Lua##X ); \
|
||||
template<> X EnumTraits<X>::Invalid = enum_add2( NUM_##X, 1 ); \
|
||||
template<> X EnumTraits<X>::Invalid = X##_Invalid; \
|
||||
template<> const char *EnumTraits<X>::szName = #X; \
|
||||
namespace LuaHelpers { template<> bool FromStack<X>( lua_State *L, X &Object, int iOffset ) { Object = Enum::Check<X>( L, iOffset ); return true; } } \
|
||||
namespace LuaHelpers { template<> void Push<X>( lua_State *L, const X &Object ) { Enum::Push<X>( L, Object ); } }
|
||||
|
||||
Reference in New Issue
Block a user