From 28ff9ee68413c4a84ec1a67bb7abcaff5a9ee983 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 13 Oct 2006 21:59:19 +0000 Subject: [PATCH] simplify --- stepmania/src/ActorUtil.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/stepmania/src/ActorUtil.cpp b/stepmania/src/ActorUtil.cpp index 814f475e1d..430967c491 100644 --- a/stepmania/src/ActorUtil.cpp +++ b/stepmania/src/ActorUtil.cpp @@ -139,21 +139,16 @@ void ActorUtil::SetParamFromStack( Lua *L, RString sName, LuaReference *pOld ) PushParamsTable( L ); int iParams = lua_gettop(L); - LuaHelpers::Push( L, sName ); - int iName = lua_gettop(L); - /* Save the old value. */ if( pOld != NULL ) { - lua_pushvalue( L, iName ); - lua_rawget( L, iParams ); + lua_getfield( L, iParams, sName ); pOld->SetFromStack( L ); } /* Set the value in the table. */ - lua_pushvalue( L, iName ); lua_pushvalue( L, iValue ); - lua_rawset( L, iParams ); + lua_setfield( L, iParams, sName ); lua_settop( L, iValue-1 ); }