mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Remove Shape:destroy().
With the changes to Shapes rendering them mere blocks of information with no role in the World save being attached to Bodies and discarded, Shape:destroy no longer has any justification for its continued existence. Truly, on several levels, it has been hoist with its own petard.
This commit is contained in:
@@ -114,7 +114,6 @@ namespace box2d
|
||||
{ "rayCast", w_Shape_rayCast },
|
||||
{ "computeAABB", w_Shape_computeAABB },
|
||||
{ "computeMass", w_Shape_computeMass },
|
||||
{ "destroy", w_Shape_destroy },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
||||
@@ -57,7 +57,6 @@ namespace box2d
|
||||
{ "rayCast", w_Shape_rayCast },
|
||||
{ "computeAABB", w_Shape_computeAABB },
|
||||
{ "computeMass", w_Shape_computeMass },
|
||||
{ "destroy", w_Shape_destroy },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
||||
@@ -48,7 +48,6 @@ namespace box2d
|
||||
{ "rayCast", w_Shape_rayCast },
|
||||
{ "computeAABB", w_Shape_computeAABB },
|
||||
{ "computeMass", w_Shape_computeMass },
|
||||
{ "destroy", w_Shape_destroy },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
||||
@@ -48,7 +48,6 @@ namespace box2d
|
||||
{ "rayCast", w_Shape_rayCast },
|
||||
{ "computeAABB", w_Shape_computeAABB },
|
||||
{ "computeMass", w_Shape_computeMass },
|
||||
{ "destroy", w_Shape_destroy },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
||||
@@ -91,16 +91,6 @@ namespace box2d
|
||||
return t->computeMass(L);
|
||||
}
|
||||
|
||||
int w_Shape_destroy(lua_State * L)
|
||||
{
|
||||
Proxy * p = (Proxy *)lua_touserdata(L, 1);
|
||||
p->own = false;
|
||||
|
||||
Shape * t = (Shape *)p->data;
|
||||
t->release();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const luaL_Reg functions[] = {
|
||||
{ "getType", w_Shape_getType },
|
||||
{ "getRadius", w_Shape_getRadius },
|
||||
@@ -109,7 +99,6 @@ namespace box2d
|
||||
{ "rayCast", w_Shape_rayCast },
|
||||
{ "computeAABB", w_Shape_computeAABB },
|
||||
{ "computeMass", w_Shape_computeMass },
|
||||
{ "destroy", w_Shape_destroy },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
||||
@@ -42,7 +42,6 @@ namespace box2d
|
||||
int w_Shape_computeAABB(lua_State * L);
|
||||
int w_Shape_computeMass(lua_State * L);
|
||||
|
||||
int w_Shape_destroy(lua_State * L);
|
||||
extern "C" int luaopen_shape(lua_State * L);
|
||||
|
||||
} // box2d
|
||||
|
||||
Reference in New Issue
Block a user