diff --git a/stepmania/src/LuaManager.cpp b/stepmania/src/LuaManager.cpp index 73061a3cc2..9f29caeed2 100644 --- a/stepmania/src/LuaManager.cpp +++ b/stepmania/src/LuaManager.cpp @@ -140,7 +140,7 @@ void LuaHelpers::ReadArrayFromTableB( Lua *L, vector &aOut ) static int LuaPanic( lua_State *L ) { RString sErr; - LuaHelpers::Pop( sErr, L ); + LuaHelpers::Pop( L, sErr ); lua_Debug ar; int level = 0; @@ -507,7 +507,7 @@ bool LuaHelpers::RunScript( Lua *L, const RString &sScript, const RString &sName if( ret ) { - LuaHelpers::Pop( sError, L ); + LuaHelpers::Pop( L, sError ); return false; } } @@ -517,7 +517,7 @@ bool LuaHelpers::RunScript( Lua *L, const RString &sScript, const RString &sName int ret = lua_pcall( L, 0, iReturnValues, 0 ); if( ret ) { - LuaHelpers::Pop( sError, L ); + LuaHelpers::Pop( L, sError ); return false; } } @@ -608,7 +608,7 @@ bool LuaHelpers::RunExpressionS( const RString &str, RString &sOut ) if( lua_isfunction( L, -1 ) ) RageException::Throw( "Result is a function; did you forget \"()\"?" ); - LuaHelpers::Pop( sOut, L ); + LuaHelpers::Pop( L, sOut ); LUA->Release( L ); return true; diff --git a/stepmania/src/LuaManager.h b/stepmania/src/LuaManager.h index 49bf3006a6..bffdaa9c08 100644 --- a/stepmania/src/LuaManager.h +++ b/stepmania/src/LuaManager.h @@ -91,7 +91,7 @@ namespace LuaHelpers bool FromStack( Lua *L, RString &Object, int iOffset ); template - bool Pop( T &val, lua_State *L ) + bool Pop( lua_State *L, T &val ) { bool bRet = LuaHelpers::FromStack( L, val, -1 ); lua_pop( L, 1 ); @@ -109,7 +109,7 @@ namespace LuaHelpers { lua_rawgeti( L, -1, i+1 ); T value = T(); - LuaHelpers::Pop( value, L ); + LuaHelpers::Pop( L, value ); aOut.push_back( value ); } } diff --git a/stepmania/src/MenuTimer.cpp b/stepmania/src/MenuTimer.cpp index 839f628807..546b94886a 100644 --- a/stepmania/src/MenuTimer.cpp +++ b/stepmania/src/MenuTimer.cpp @@ -170,7 +170,7 @@ void MenuTimer::SetText( float fSeconds ) lua_call(L, 1, 1); RString sText; - LuaHelpers::Pop( sText, L ); + LuaHelpers::Pop( L, sText ); m_text[i].SetText( sText ); } diff --git a/stepmania/src/PercentageDisplay.cpp b/stepmania/src/PercentageDisplay.cpp index c4dbf34952..839b829097 100644 --- a/stepmania/src/PercentageDisplay.cpp +++ b/stepmania/src/PercentageDisplay.cpp @@ -169,7 +169,7 @@ void PercentageDisplay::Refresh() ASSERT( !lua_isnil(L, -1) ); LuaHelpers::Push( fPercentDancePoints, L ); lua_call( L, 1, 1 ); // 1 args, 1 result - LuaHelpers::Pop( sNumToDisplay, L ); + LuaHelpers::Pop( L, sNumToDisplay ); LUA->Release(L); // HACK: Use the last frame in the numbers texture as '-' diff --git a/stepmania/src/Preference.cpp b/stepmania/src/Preference.cpp index 092b4a0c30..94df56caae 100644 --- a/stepmania/src/Preference.cpp +++ b/stepmania/src/Preference.cpp @@ -85,7 +85,7 @@ void IPreference::SetFromStack( lua_State *L ) } \ template<> void PrefSetFromStack( lua_State *L, type &v ) \ { \ - LuaHelpers::Pop( v, L ); \ + LuaHelpers::Pop( L, v ); \ } \ template<> void PrefPushValue( lua_State *L, const type &v ) \ { \ diff --git a/stepmania/src/ThemeMetric.h b/stepmania/src/ThemeMetric.h index 0feb534527..82cad48fa2 100644 --- a/stepmania/src/ThemeMetric.h +++ b/stepmania/src/ThemeMetric.h @@ -321,7 +321,7 @@ public: else { m_Value.Unset(); - LuaHelpers::Pop( m_currentValue, L ); + LuaHelpers::Pop( L, m_currentValue ); } LUA->Release(L); @@ -349,7 +349,7 @@ public: m_Value.PushSelf( L ); lua_call(L, 0, 1); ASSERT( !lua_isnil(L, -1) ); - LuaHelpers::Pop( m_currentValue, L ); + LuaHelpers::Pop( L, m_currentValue ); LUA->Release(L); }