From 82ae5fccc82f399b9a6ca52d0dc519f849eff9e4 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sat, 16 Jan 2016 19:31:49 +0000 Subject: MirLua: project cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@16104 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/m_clist.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/MirLua/src/m_clist.cpp') diff --git a/plugins/MirLua/src/m_clist.cpp b/plugins/MirLua/src/m_clist.cpp index a39534c0da..abb54357a6 100644 --- a/plugins/MirLua/src/m_clist.cpp +++ b/plugins/MirLua/src/m_clist.cpp @@ -4,14 +4,14 @@ static int clist_AddMainMenuItem(lua_State *L) { HGENMENU res = NULL; - if (lua_type(L, 1) == LUA_TSTRING) + if (lua_isstring(L, 1)) { const char *name = luaL_checkstring(L, 1); int position = lua_tointeger(L, 2); HANDLE hIcon = (HANDLE)lua_touserdata(L, 3); res = Menu_CreateRoot(MO_MAIN, ptrT(Utf8DecodeT(name)), position, hIcon); } - else if (lua_type(L, 1) == LUA_TTABLE) + else if (lua_istable(L, 1)) { CMenuItem mi; MakeMenuItem(L, mi); @@ -27,14 +27,14 @@ static int clist_AddContactMenuItem(lua_State *L) { HGENMENU res = NULL; - if (lua_type(L, 1) == LUA_TSTRING) + if (lua_isstring(L, 1)) { const char *name = luaL_checkstring(L, 1); int position = lua_tointeger(L, 2); HANDLE hIcon = (HANDLE)lua_touserdata(L, 3); res = Menu_CreateRoot(MO_MAIN, ptrT(Utf8DecodeT(name)), position, hIcon); } - else if (lua_type(L, 1) == LUA_TTABLE) + else if (lua_istable(L, 1)) { CMenuItem mi; MakeMenuItem(L, mi); @@ -49,7 +49,7 @@ static int clist_AddContactMenuItem(lua_State *L) static int clist_AddTrayMenuItem(lua_State *L) { - if (lua_type(L, 1) != LUA_TTABLE) + if (lua_istable(L, 1) != LUA_TTABLE) { lua_pushlightuserdata(L, 0); return 1; -- cgit v1.2.3