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
+1
View File
@@ -19,6 +19,7 @@
**/
#include "Reference.h"
#include "runtime.h"
namespace love
{
+1 -2
View File
@@ -21,8 +21,7 @@
#ifndef LOVE_REFERENCE_H
#define LOVE_REFERENCE_H
// LOVE
#include "runtime.h"
struct lua_State;
namespace love
{
+2 -2
View File
@@ -56,7 +56,7 @@ public:
public:
SharedString(const char *string, size_t len)
: len(len)
: len(len)
{
str = new char[len+1];
memcpy(str, string, len);
@@ -72,7 +72,7 @@ public:
public:
SharedTable(std::vector<std::pair<Variant, Variant>> *table)
: table(table)
: table(table)
{
}
-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;