Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-06-25 13:14:37 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-25 13:14:37 +0400
commitcc0784c1b9c4d813837dedddd5b2b4c52fe291f0 (patch)
treec898623170b1576dddeb38f1ef30aa3cc83d6567 /source/gameengine/Physics/common
parent78196d60d1a4585c613f822040f7dc339b9558b4 (diff)
optionally use guarded alloc for tiles compositor, also replace allocation functions with a macro.
Diffstat (limited to 'source/gameengine/Physics/common')
-rw-r--r--source/gameengine/Physics/common/PHY_IController.h4
-rw-r--r--source/gameengine/Physics/common/PHY_IGraphicController.h3
-rw-r--r--source/gameengine/Physics/common/PHY_IMotionState.h4
-rw-r--r--source/gameengine/Physics/common/PHY_IPhysicsController.h5
-rw-r--r--source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h14
-rw-r--r--source/gameengine/Physics/common/PHY_IVehicle.h4
6 files changed, 12 insertions, 22 deletions
diff --git a/source/gameengine/Physics/common/PHY_IController.h b/source/gameengine/Physics/common/PHY_IController.h
index d25af9f898c..239ac3366e1 100644
--- a/source/gameengine/Physics/common/PHY_IController.h
+++ b/source/gameengine/Physics/common/PHY_IController.h
@@ -56,9 +56,7 @@ class PHY_IController
#ifdef WITH_CXX_GUARDEDALLOC
-public:
- void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:PHY_IController"); }
- void operator delete( void *mem ) { MEM_freeN(mem); }
+ MEM_CXX_CLASS_ALLOC_FUNCS("GE:PHY_IController")
#endif
};
diff --git a/source/gameengine/Physics/common/PHY_IGraphicController.h b/source/gameengine/Physics/common/PHY_IGraphicController.h
index 6a94b3d6ea9..af337188818 100644
--- a/source/gameengine/Physics/common/PHY_IGraphicController.h
+++ b/source/gameengine/Physics/common/PHY_IGraphicController.h
@@ -54,8 +54,7 @@ class PHY_IGraphicController : public PHY_IController
virtual PHY_IGraphicController* GetReplica(class PHY_IMotionState* motionstate) {return 0;}
#ifdef WITH_CXX_GUARDEDALLOC
- void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:PHY_IController"); }
- void operator delete( void *mem ) { MEM_freeN(mem); }
+ MEM_CXX_CLASS_ALLOC_FUNCS("GE:PHY_IController")
#endif
};
diff --git a/source/gameengine/Physics/common/PHY_IMotionState.h b/source/gameengine/Physics/common/PHY_IMotionState.h
index 77c51ebdb79..2eb2a9f39cf 100644
--- a/source/gameengine/Physics/common/PHY_IMotionState.h
+++ b/source/gameengine/Physics/common/PHY_IMotionState.h
@@ -61,9 +61,7 @@ class PHY_IMotionState
#ifdef WITH_CXX_GUARDEDALLOC
-public:
- void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:PHY_IMotionState"); }
- void operator delete( void *mem ) { MEM_freeN(mem); }
+ MEM_CXX_CLASS_ALLOC_FUNCS("GE:PHY_IMotionState")
#endif
};
diff --git a/source/gameengine/Physics/common/PHY_IPhysicsController.h b/source/gameengine/Physics/common/PHY_IPhysicsController.h
index 727cbda931d..7eea2a183a1 100644
--- a/source/gameengine/Physics/common/PHY_IPhysicsController.h
+++ b/source/gameengine/Physics/common/PHY_IPhysicsController.h
@@ -102,10 +102,9 @@ class PHY_IPhysicsController : public PHY_IController
PHY__Vector3 GetWorldPosition(PHY__Vector3& localpos);
+
#ifdef WITH_CXX_GUARDEDALLOC
-public:
- void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:PHY_IPhysicsController"); }
- void operator delete( void *mem ) { MEM_freeN(mem); }
+ MEM_CXX_CLASS_ALLOC_FUNCS("GE:PHY_IPhysicsController")
#endif
};
diff --git a/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h b/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h
index a2597f917e3..8fde9e289dc 100644
--- a/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h
+++ b/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h
@@ -87,11 +87,10 @@ public:
m_faceUV(faceUV)
{
}
-
+
+
#ifdef WITH_CXX_GUARDEDALLOC
-public:
- void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:PHY_IRayCastFilterCallback"); }
- void operator delete( void *mem ) { MEM_freeN(mem); }
+ MEM_CXX_CLASS_ALLOC_FUNCS("GE:PHY_IRayCastFilterCallback")
#endif
};
@@ -179,11 +178,10 @@ class PHY_IPhysicsEnvironment
virtual float getConstraintParam(int constraintId,int param) = 0;
virtual void exportFile(const char* filename) {};
-
+
+
#ifdef WITH_CXX_GUARDEDALLOC
-public:
- void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:PHY_IPhysicsEnvironment"); }
- void operator delete( void *mem ) { MEM_freeN(mem); }
+ MEM_CXX_CLASS_ALLOC_FUNCS("GE:PHY_IPhysicsEnvironment")
#endif
};
diff --git a/source/gameengine/Physics/common/PHY_IVehicle.h b/source/gameengine/Physics/common/PHY_IVehicle.h
index 735ce5a8791..731e22d9f0f 100644
--- a/source/gameengine/Physics/common/PHY_IVehicle.h
+++ b/source/gameengine/Physics/common/PHY_IVehicle.h
@@ -62,9 +62,7 @@ public:
#ifdef WITH_CXX_GUARDEDALLOC
-public:
- void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:PHY_IVehicle"); }
- void operator delete( void *mem ) { MEM_freeN(mem); }
+ MEM_CXX_CLASS_ALLOC_FUNCS("GE:PHY_IVehicle")
#endif
};