Fix compile for apple's g++ 4.0.1.

This commit is contained in:
Steve Checkoway
2006-10-05 10:32:57 +00:00
parent 0e0fcfe6cf
commit 03ed75018f
2 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -61,6 +61,8 @@ struct EnumTraits
static T Invalid;
static const char *szName;
};
template<typename T> LuaReference EnumTraits<T>::StringToEnum;
template<typename T> LuaReference EnumTraits<T>::EnumToString;
namespace Enum
{
@@ -156,8 +158,6 @@ static void Lua##X(lua_State* L) \
lua_setglobal( L, #X "Index" ); \
} \
REGISTER_WITH_LUA_FUNCTION( Lua##X ); \
template<> LuaReference EnumTraits<X>::StringToEnum; \
template<> LuaReference EnumTraits<X>::EnumToString; \
template<> X EnumTraits<X>::Invalid = enum_add2( NUM_##X, 1 ); \
template<> const char *EnumTraits<X>::szName = #X; \
bool LuaHelpers::FromStack( lua_State *L, X &Object, int iOffset ) { Object = Enum::Check<X>( L, iOffset ); return true; } \
+2 -1
View File
@@ -72,9 +72,10 @@ public:
{
if( m_sName != "" && THEME && THEME->IsThemeLoaded() )
{
using namespace LuaHelpers;
Lua *L = LUA->Get();
THEME->PushMetric( L, m_sGroup, m_sName );
if( !LuaHelpers::FromStack(L, m_currentValue, -1) )
if( !FromStack(L, m_currentValue, -1) )
m_currentValue = T();
lua_pop( L, 1 );
LUA->Release(L);