diff options
author | Eugene Sandulenko | 2010-08-14 19:56:15 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2010-10-12 22:43:36 +0000 |
commit | 72130c284d2f3b2db8d54da96f798806082029f3 (patch) | |
tree | 84c5df72a11ec6aacd384287bbbb0b6e6e160023 /engines/sword25/script/luabindhelper.cpp | |
parent | 43959cc6bd87cbe59b2d9440c6f819c39cb574fd (diff) | |
download | scummvm-rg350-72130c284d2f3b2db8d54da96f798806082029f3.tar.gz scummvm-rg350-72130c284d2f3b2db8d54da96f798806082029f3.tar.bz2 scummvm-rg350-72130c284d2f3b2db8d54da96f798806082029f3.zip |
SWORD25: Fix couple more warnings
svn-id: r53236
Diffstat (limited to 'engines/sword25/script/luabindhelper.cpp')
-rw-r--r-- | engines/sword25/script/luabindhelper.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/engines/sword25/script/luabindhelper.cpp b/engines/sword25/script/luabindhelper.cpp index 76e8faac8e..a4f42331e6 100644 --- a/engines/sword25/script/luabindhelper.cpp +++ b/engines/sword25/script/luabindhelper.cpp @@ -110,9 +110,7 @@ bool BS_LuaBindhelper::AddFunctionsToLib(lua_State *L, const Common::String &Lib lua_gettable(L, LUA_GLOBALSINDEX); RegisterPermanent(L, Functions->name); } - } - // If the table name is not empty, the functions are added to the given table - else { + } else { // If the table name is not empty, the functions are added to the given table // Ensure that the library table exists if (!_CreateTable(L, LibName)) return false; @@ -329,11 +327,13 @@ bool BS_LuaBindhelper::_CreateTable(lua_State *L, const Common::String &TableNam while (PartBegin) { const char *PartEnd = strchr(PartBegin, '.'); - if (!PartEnd) PartEnd = PartBegin + strlen(PartBegin); + if (!PartEnd) + PartEnd = PartBegin + strlen(PartBegin); Common::String SubTableName(PartBegin, PartEnd - PartBegin); // Tables with an empty string as the name are not allowed - if (SubTableName.size() == 0) return false; + if (SubTableName.size() == 0) + return false; // Verify that the table with the name already exists // The first round will be searched in the global namespace, with later passages @@ -344,7 +344,8 @@ bool BS_LuaBindhelper::_CreateTable(lua_State *L, const Common::String &TableNam } else { lua_pushstring(L, SubTableName.c_str()); lua_gettable(L, -2); - if (!lua_isnil(L, -1)) lua_remove(L, -2); + if (!lua_isnil(L, -1)) + lua_remove(L, -2); } // If it doesn't exist, create table |