diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/cat/LuaCheckbox.cpp | 2 | ||||
| -rw-r--r-- | src/cat/LuaLabel.cpp | 3 | ||||
| -rw-r--r-- | src/cat/LuaTextbox.cpp | 3 |
3 files changed, 2 insertions, 6 deletions
diff --git a/src/cat/LuaCheckbox.cpp b/src/cat/LuaCheckbox.cpp index 844573e..8256730 100644 --- a/src/cat/LuaCheckbox.cpp +++ b/src/cat/LuaCheckbox.cpp @@ -53,7 +53,6 @@ int LuaCheckbox::checked(lua_State * l) int args = lua_gettop(l); if(args) { - luaL_checktype(l, 1, LUA_TBOOLEAN); checkbox->SetChecked(lua_toboolean(l, 1)); return 0; } @@ -84,7 +83,6 @@ int LuaCheckbox::text(lua_State * l) int args = lua_gettop(l); if(args) { - luaL_checktype(l, 1, LUA_TSTRING); checkbox->SetText(lua_tostring(l, 1)); return 0; } diff --git a/src/cat/LuaLabel.cpp b/src/cat/LuaLabel.cpp index e2ca56d..007e009 100644 --- a/src/cat/LuaLabel.cpp +++ b/src/cat/LuaLabel.cpp @@ -40,8 +40,7 @@ int LuaLabel::text(lua_State * l) int args = lua_gettop(l); if(args) { - luaL_checktype(l, 1, LUA_TSTRING); - label->SetText(lua_tostring(l, 1)); + label->SetText(std::string(lua_tostring(l, 1))); return 0; } else diff --git a/src/cat/LuaTextbox.cpp b/src/cat/LuaTextbox.cpp index fa5753c..46285c8 100644 --- a/src/cat/LuaTextbox.cpp +++ b/src/cat/LuaTextbox.cpp @@ -100,8 +100,7 @@ int LuaTextbox::text(lua_State * l) int args = lua_gettop(l); if(args) { - luaL_checktype(l, 1, LUA_TSTRING); - textbox->SetText(lua_tostring(l, 1)); + textbox->SetText(std::string(lua_tostring(l, 1))); return 0; } else |
