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
@@ -41,7 +41,7 @@ namespace opengl
ParticleSystem *luax_checkparticlesystem(lua_State *L, int idx)
{
return luax_checktype<ParticleSystem>(L, idx, ParticleSystem::type);
return luax_checktype<ParticleSystem>(L, idx);
}
int w_ParticleSystem_clone(lua_State *L)
@@ -584,7 +584,7 @@ int w_ParticleSystem_setQuads(lua_State *L)
{
lua_rawgeti(L, 2, i);
Quad *q = luax_checktype<Quad>(L, -1, Quad::type);
Quad *q = luax_checktype<Quad>(L, -1);
quads.push_back(q);
lua_pop(L, 1);
@@ -594,7 +594,7 @@ int w_ParticleSystem_setQuads(lua_State *L)
{
for (int i = 2; i <= lua_gettop(L); i++)
{
Quad *q = luax_checktype<Quad>(L, i, Quad::type);
Quad *q = luax_checktype<Quad>(L, i);
quads.push_back(q);
}
}