summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/mlua_utils.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-11-25 18:17:36 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-11-25 18:17:36 +0000
commitf155980e50b5670593eb0857a061d16f708a362f (patch)
treedbf0c648b8db4eae88d7ce70bf3f8e7a4edf9ff9 /plugins/MirLua/src/mlua_utils.cpp
parentb4132ae8daa7cb96ef49eca4827380c0e629a031 (diff)
MirLua: removed needless stuff
git-svn-id: http://svn.miranda-ng.org/main/trunk@15778 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/mlua_utils.cpp')
-rw-r--r--plugins/MirLua/src/mlua_utils.cpp35
1 files changed, 14 insertions, 21 deletions
diff --git a/plugins/MirLua/src/mlua_utils.cpp b/plugins/MirLua/src/mlua_utils.cpp
index 9bfa298cca..3bd1298263 100644
--- a/plugins/MirLua/src/mlua_utils.cpp
+++ b/plugins/MirLua/src/mlua_utils.cpp
@@ -75,46 +75,39 @@ bool luaM_toboolean(lua_State *L, int idx)
WPARAM luaM_towparam(lua_State *L, int idx)
{
- WPARAM wParam = NULL;
switch (lua_type(L, idx))
{
case LUA_TBOOLEAN:
- wParam = lua_toboolean(L, idx);
- break;
+ return lua_toboolean(L, idx);
case LUA_TNUMBER:
- wParam = lua_tonumber(L, idx);
- break;
+ return lua_tonumber(L, idx);
case LUA_TSTRING:
- wParam = (WPARAM)lua_tostring(L, idx);
+ return (WPARAM)lua_tostring(L, idx);
break;
- case LUA_TUSERDATA:
+ //case LUA_TUSERDATA:
case LUA_TLIGHTUSERDATA:
- wParam = (WPARAM)lua_touserdata(L, idx);
- break;
+ return (WPARAM)lua_touserdata(L, idx);
+ default:
+ return NULL;
}
- return wParam;
}
LPARAM luaM_tolparam(lua_State *L, int idx)
{
- LPARAM lParam = NULL;
switch (lua_type(L, idx))
{
case LUA_TBOOLEAN:
- lParam = lua_toboolean(L, idx);
- break;
+ return lua_toboolean(L, idx);
case LUA_TNUMBER:
- lParam = lua_tonumber(L, idx);
- break;
+ return lua_tonumber(L, idx);
case LUA_TSTRING:
- lParam = (LPARAM)lua_tostring(L, idx);
- break;
- case LUA_TUSERDATA:
+ return (LPARAM)lua_tostring(L, idx);
+ //case LUA_TUSERDATA:
case LUA_TLIGHTUSERDATA:
- lParam = (LPARAM)lua_touserdata(L, idx);
- break;
+ return (LPARAM)lua_touserdata(L, idx);
+ default:
+ return NULL;
}
- return lParam;
}
int luaM_totable(lua_State *L)