From 6431aee91c302245f354fcbac9a9bcffff38d6bc Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 5 Oct 2006 20:04:14 +0000 Subject: [PATCH] missed: simplify --- stepmania/src/LuaManager.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/stepmania/src/LuaManager.cpp b/stepmania/src/LuaManager.cpp index 9afe216b6f..c0df46baaa 100644 --- a/stepmania/src/LuaManager.cpp +++ b/stepmania/src/LuaManager.cpp @@ -307,17 +307,13 @@ XNode *LuaManager::GetLuaInformation() const lua_pop( L, 1 ); // pop name // Get base class. - if( luaL_getmetafield( L, -1, "__index" ) ) + if( luaL_getmetafield( L, -1, "base" ) ) { - if( luaL_getmetafield(L, -1, "class") ) - { - name = lua_tostring( L, -1 ); - - if( name ) - c.m_sBaseName = name; - lua_pop( L, 1 ); // pop name - } - lua_pop( L, 1 ); // pop base class + name = lua_tostring( L, -1 ); + + if( name ) + c.m_sBaseName = name; + lua_pop( L, 1 ); // pop name } // Get methods.