mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
love.physics: move internal box2d->love object map to World instances, and clean up some physics object code. Resolves issue #1465.
This commit is contained in:
@@ -25,8 +25,6 @@
|
||||
#include "World.h"
|
||||
#include "Physics.h"
|
||||
|
||||
#include "common/Memoizer.h"
|
||||
|
||||
// STD
|
||||
#include <bitset>
|
||||
|
||||
@@ -47,17 +45,12 @@ Shape::Shape(b2Shape *shape, bool own)
|
||||
: shape(shape)
|
||||
, own(own)
|
||||
{
|
||||
if (own)
|
||||
Memoizer::add(shape, this);
|
||||
}
|
||||
|
||||
Shape::~Shape()
|
||||
{
|
||||
if (shape && own)
|
||||
{
|
||||
Memoizer::remove(shape);
|
||||
delete shape;
|
||||
}
|
||||
shape = nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user