Automatically deduce the type in luax_checktype, luax_getmodule, luax_optmodule and luax_totype

--HG--
branch : dynamiccore2
This commit is contained in:
Bart van Strien
2016-11-13 17:13:40 +01:00
parent 4a0a90e511
commit 7dd960619d
61 changed files with 120 additions and 98 deletions
+2 -2
View File
@@ -30,7 +30,7 @@ namespace box2d
Fixture *luax_checkfixture(lua_State *L, int idx)
{
Fixture *f = luax_checktype<Fixture>(L, idx, Fixture::type);
Fixture *f = luax_checktype<Fixture>(L, idx);
if (!f->isValid())
luaL_error(L, "Attempt to use destroyed fixture.");
return f;
@@ -263,7 +263,7 @@ int w_Fixture_destroy(lua_State *L)
int w_Fixture_isDestroyed(lua_State *L)
{
Fixture *f = luax_checktype<Fixture>(L, 1, Fixture::type);
Fixture *f = luax_checktype<Fixture>(L, 1);
luax_pushboolean(L, !f->isValid());
return 1;
}