This commit is contained in:
Glenn Maynard
2006-10-07 02:32:22 +00:00
parent 357f3ee135
commit 0e1dffeba5
2 changed files with 2 additions and 12 deletions
-8
View File
@@ -81,14 +81,6 @@ void IPreference::SetFromStack( lua_State *L )
template<> void PrefFromString( const RString &s, type &v ) \
{ \
::FromString( s, v ); \
} \
template<> void PrefSetFromStack( lua_State *L, type &v ) \
{ \
LuaHelpers::Pop( L, v ); \
} \
template<> void PrefPushValue( lua_State *L, const type &v ) \
{ \
LuaHelpers::Push( L, v ); \
}
READFROM_AND_WRITETO( int )
+2 -4
View File
@@ -46,8 +46,6 @@ void BroadcastPreferenceChanged( const RString& sPreferenceName );
template <class BasicType> RString PrefToString( const BasicType &v );
template <class BasicType> void PrefFromString( const RString &s, BasicType &v );
template <class BasicType> void PrefSetFromStack( lua_State *L, BasicType &v );
template <class BasicType> void PrefPushValue( lua_State *L, const BasicType &v );
template <class T, class BasicType=T>
class Preference : public IPreference
@@ -71,13 +69,13 @@ public:
}
void SetFromStack( lua_State *L )
{
PrefSetFromStack( L, (BasicType &)m_currentValue );
LuaHelpers::Pop( L, (BasicType &)m_currentValue );
if( m_pfnValidate )
m_pfnValidate( m_currentValue );
}
void PushValue( lua_State *L ) const
{
PrefPushValue<BasicType>( L, m_currentValue );
LuaHelpers::Push<BasicType>( L, m_currentValue );
}
void LoadDefault()