diff --git a/stepmania/src/LuaReference.cpp b/stepmania/src/LuaReference.cpp index 9962b50e3c..3277d8d6d0 100644 --- a/stepmania/src/LuaReference.cpp +++ b/stepmania/src/LuaReference.cpp @@ -138,7 +138,7 @@ void LuaReference::Unregister() m_iReference = LUA_NOREF; } -void LuaExpression::SetFromExpression( const RString &sExpression ) +void LuaReference::SetFromExpression( const RString &sExpression ) { RString sFullExpression = "return " + sExpression; SetName( sFullExpression ); diff --git a/stepmania/src/LuaReference.h b/stepmania/src/LuaReference.h index ca758df5e0..f68399b572 100644 --- a/stepmania/src/LuaReference.h +++ b/stepmania/src/LuaReference.h @@ -21,6 +21,10 @@ public: void SetFromStack( Lua *L ); void SetFromNil(); + /* Evaluate an expression that returns an object; store the object in a reference. + * For example, evaluating "{ 1, 2, 3 }" will result in a reference to a table. */ + void SetFromExpression( const RString &sExpression ); + /* Deep-copy tables, detaching this reference from any others. */ void DeepCopy(); @@ -48,13 +52,9 @@ private: RString m_sName; }; -/* Evaluate an expression that returns an object; store the object in a reference. - * For example, evaluating "{ 1, 2, 3 }" will result in a reference to a table. */ class LuaExpression: public LuaReference { public: - LuaExpression( const RString &sExpression = "" ) { if( sExpression != "" ) SetFromExpression( sExpression ); } - void SetFromExpression( const RString &sExpression ); }; class LuaTable: public LuaReference