Browse Source

cleaning up *Shape constructors

--HG--
branch : box2d-update
Bill Meltsner 14 years ago
parent
commit
1b14dcaeb8

+ 1 - 3
src/modules/physics/box2d/ChainShape.cpp

@@ -34,10 +34,8 @@ namespace physics
 namespace box2d
 {
 	ChainShape::ChainShape(b2ChainShape * c, bool loop)
-		: loop(loop)
+		: Shape(c), loop(loop)
 	{
-		shape = c;
-		Memoizer::add(shape, this);
 	}
 
 	ChainShape::~ChainShape()

+ 1 - 2
src/modules/physics/box2d/CircleShape.cpp

@@ -33,9 +33,8 @@ namespace physics
 namespace box2d
 {
 	CircleShape::CircleShape(b2CircleShape * c)
+		: Shape(c)
 	{
-		shape = c;
-		Memoizer::add(shape, this);
 	}
 
 	CircleShape::~CircleShape()

+ 1 - 2
src/modules/physics/box2d/EdgeShape.cpp

@@ -33,9 +33,8 @@ namespace physics
 namespace box2d
 {
 	EdgeShape::EdgeShape(b2EdgeShape * e)
+		: Shape(e)
 	{
-		shape = e;
-		Memoizer::add(shape, this);
 	}
 
 	EdgeShape::~EdgeShape()

+ 1 - 2
src/modules/physics/box2d/PolygonShape.cpp

@@ -34,9 +34,8 @@ namespace physics
 namespace box2d
 {
 	PolygonShape::PolygonShape(b2PolygonShape * p)
+		: Shape(p)
 	{
-		shape = p;
-		Memoizer::add(shape, this);
 	}
 
 	PolygonShape::~PolygonShape()