mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Automatically deduce the type in luax_checktype, luax_getmodule, luax_optmodule and luax_totype
--HG-- branch : dynamiccore2
This commit is contained in:
@@ -29,7 +29,7 @@ namespace box2d
|
||||
|
||||
World *luax_checkworld(lua_State *L, int idx)
|
||||
{
|
||||
World *w = luax_checktype<World>(L, idx, World::type);
|
||||
World *w = luax_checktype<World>(L, idx);
|
||||
if (!w->isValid())
|
||||
luaL_error(L, "Attempt to use destroyed world.");
|
||||
return w;
|
||||
@@ -203,7 +203,7 @@ int w_World_destroy(lua_State *L)
|
||||
|
||||
int w_World_isDestroyed(lua_State *L)
|
||||
{
|
||||
World *w = luax_checktype<World>(L, 1, World::type);
|
||||
World *w = luax_checktype<World>(L, 1);
|
||||
luax_pushboolean(L, !w->isValid());
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user