Fix compile for apple's g++ 4.0.1.
This commit is contained in:
@@ -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; } \
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user