From d2b9ea130d653e41f9c4b45a9c2220f0abbd88d4 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Mon, 2 Oct 2006 01:31:24 +0000 Subject: [PATCH] Separate declaration from definition. This way, if LuaXType( Foo ) is used without a preceding LuaDeclareType( Foo ) the compiler will complain. --- stepmania/src/EnumHelper.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stepmania/src/EnumHelper.h b/stepmania/src/EnumHelper.h index 4ab7802d5a..fffa043882 100644 --- a/stepmania/src/EnumHelper.h +++ b/stepmania/src/EnumHelper.h @@ -160,8 +160,8 @@ template<> LuaReference EnumTraits::StringToEnum; \ template<> LuaReference EnumTraits::EnumToString; \ template<> X EnumTraits::Invalid = enum_add2( NUM_##X, 1 ); \ template<> const char *EnumTraits::szName = #X; \ -namespace LuaHelpers { bool FromStack( lua_State *L, X &Object, int iOffset ) { Object = Enum::Check( L, iOffset ); return true; } } \ -namespace LuaHelpers { void Push( lua_State *L, const X &Object ) { Enum::Push( L, Object ); } } +bool LuaHelpers::FromStack( lua_State *L, X &Object, int iOffset ) { Object = Enum::Check( L, iOffset ); return true; } \ +void LuaHelpers::Push( lua_State *L, const X &Object ) { Enum::Push( L, Object ); } #endif