Remove some unused love.physics Body methods, and clean up a bit of code.

This commit is contained in:
Alex Szpakowski
2019-01-03 20:36:47 -04:00
parent 19890a65c3
commit a7d0c02058
5 changed files with 4 additions and 30 deletions
-15
View File
@@ -512,21 +512,6 @@ int Body::getContacts(lua_State *L) const
return 1;
}
b2Vec2 Body::getVector(lua_State *L)
{
love::luax_assert_argc(L, 2, 2);
b2Vec2 v((float)lua_tonumber(L, 1), (float)lua_tonumber(L, 2));
lua_pop(L, 2);
return v;
}
int Body::pushVector(lua_State *L, const b2Vec2 &v)
{
lua_pushnumber(L, v.x);
lua_pushnumber(L, v.y);
return 2;
}
void Body::destroy()
{
if (world->world->IsLocked())
-11
View File
@@ -426,17 +426,6 @@ public:
private:
/**
* Gets a 2d vector from the arguments on the stack.
**/
b2Vec2 getVector(lua_State *L);
/**
* Pushed the x- and y-components of a vector on
* the stack.
**/
int pushVector(lua_State *L, const b2Vec2 &v);
// FIXME: This should be a weak reference, rather than being completely
// unowned?
World *world;