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:
Diffstat (limited to 'source/gameengine/SceneGraph')
-rw-r--r--source/gameengine/SceneGraph/SG_BBox.h4
-rw-r--r--source/gameengine/SceneGraph/SG_Controller.h9
-rw-r--r--source/gameengine/SceneGraph/SG_DList.h4
-rw-r--r--source/gameengine/SceneGraph/SG_IObject.h4
-rw-r--r--source/gameengine/SceneGraph/SG_Node.h4
-rw-r--r--source/gameengine/SceneGraph/SG_ParentRelation.h4
-rw-r--r--source/gameengine/SceneGraph/SG_QList.h4
-rw-r--r--source/gameengine/SceneGraph/SG_Spatial.h4
-rw-r--r--source/gameengine/SceneGraph/SG_Tree.h8
9 files changed, 12 insertions, 33 deletions
diff --git a/source/gameengine/SceneGraph/SG_BBox.h b/source/gameengine/SceneGraph/SG_BBox.h
index 33e29b85a5f..cd1c523ff40 100644
--- a/source/gameengine/SceneGraph/SG_BBox.h
+++ b/source/gameengine/SceneGraph/SG_BBox.h
@@ -136,9 +136,7 @@ public:
#ifdef WITH_CXX_GUARDEDALLOC
-public:
- void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SG_BBox"); }
- void operator delete( void *mem ) { MEM_freeN(mem); }
+ MEM_CXX_CLASS_ALLOC_FUNCS("GE:SG_BBox")
#endif
};
diff --git a/source/gameengine/SceneGraph/SG_Controller.h b/source/gameengine/SceneGraph/SG_Controller.h
index 7100debe632..d82738dbb86 100644
--- a/source/gameengine/SceneGraph/SG_Controller.h
+++ b/source/gameengine/SceneGraph/SG_Controller.h
@@ -43,12 +43,6 @@
class SG_Controller
{
public:
-
-#ifdef WITH_CXX_GUARDEDALLOC
- void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "SG_Controller"); }
- void operator delete( void *mem ) { MEM_freeN(mem); }
-#endif
-
SG_Controller(
) :
m_pObject(NULL) {
@@ -122,6 +116,9 @@ public:
protected:
SG_IObject* m_pObject;
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("GE:SG_Controller")
+#endif
};
#endif //__SG_CONTROLLER_H__
diff --git a/source/gameengine/SceneGraph/SG_DList.h b/source/gameengine/SceneGraph/SG_DList.h
index 90e3226f227..be1c1fda2f2 100644
--- a/source/gameengine/SceneGraph/SG_DList.h
+++ b/source/gameengine/SceneGraph/SG_DList.h
@@ -217,9 +217,7 @@ public:
#ifdef WITH_CXX_GUARDEDALLOC
-public:
- void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SG_DList"); }
- void operator delete( void *mem ) { MEM_freeN(mem); }
+ MEM_CXX_CLASS_ALLOC_FUNCS("GE:SG_DList")
#endif
};
diff --git a/source/gameengine/SceneGraph/SG_IObject.h b/source/gameengine/SceneGraph/SG_IObject.h
index a1d4207e508..c36c984f3d3 100644
--- a/source/gameengine/SceneGraph/SG_IObject.h
+++ b/source/gameengine/SceneGraph/SG_IObject.h
@@ -367,9 +367,7 @@ protected :
#ifdef WITH_CXX_GUARDEDALLOC
-public:
- void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SG_IObject"); }
- void operator delete( void *mem ) { MEM_freeN(mem); }
+ MEM_CXX_CLASS_ALLOC_FUNCS("GE:SG_IObject")
#endif
};
diff --git a/source/gameengine/SceneGraph/SG_Node.h b/source/gameengine/SceneGraph/SG_Node.h
index 41133495f2e..1d0c0e592e6 100644
--- a/source/gameengine/SceneGraph/SG_Node.h
+++ b/source/gameengine/SceneGraph/SG_Node.h
@@ -271,9 +271,7 @@ private:
#ifdef WITH_CXX_GUARDEDALLOC
-public:
- void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SG_Node"); }
- void operator delete( void *mem ) { MEM_freeN(mem); }
+ MEM_CXX_CLASS_ALLOC_FUNCS("GE:SG_Node")
#endif
};
diff --git a/source/gameengine/SceneGraph/SG_ParentRelation.h b/source/gameengine/SceneGraph/SG_ParentRelation.h
index 4140563828f..925c0ed2766 100644
--- a/source/gameengine/SceneGraph/SG_ParentRelation.h
+++ b/source/gameengine/SceneGraph/SG_ParentRelation.h
@@ -131,9 +131,7 @@ protected :
#ifdef WITH_CXX_GUARDEDALLOC
-public:
- void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SG_ParentRelation"); }
- void operator delete( void *mem ) { MEM_freeN(mem); }
+ MEM_CXX_CLASS_ALLOC_FUNCS("GE:SG_ParentRelation")
#endif
};
diff --git a/source/gameengine/SceneGraph/SG_QList.h b/source/gameengine/SceneGraph/SG_QList.h
index e1288877b1d..bcc56f05615 100644
--- a/source/gameengine/SceneGraph/SG_QList.h
+++ b/source/gameengine/SceneGraph/SG_QList.h
@@ -157,9 +157,7 @@ public:
#ifdef WITH_CXX_GUARDEDALLOC
-public:
- void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SG_QList"); }
- void operator delete( void *mem ) { MEM_freeN(mem); }
+ MEM_CXX_CLASS_ALLOC_FUNCS("GE:SG_QList")
#endif
};
diff --git a/source/gameengine/SceneGraph/SG_Spatial.h b/source/gameengine/SceneGraph/SG_Spatial.h
index 32f91103369..e456851d183 100644
--- a/source/gameengine/SceneGraph/SG_Spatial.h
+++ b/source/gameengine/SceneGraph/SG_Spatial.h
@@ -287,9 +287,7 @@ protected:
#ifdef WITH_CXX_GUARDEDALLOC
-public:
- void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SG_Spatial"); }
- void operator delete( void *mem ) { MEM_freeN(mem); }
+ MEM_CXX_CLASS_ALLOC_FUNCS("GE:SG_Spatial")
#endif
};
diff --git a/source/gameengine/SceneGraph/SG_Tree.h b/source/gameengine/SceneGraph/SG_Tree.h
index b2cbb227f77..e0d5c712b73 100644
--- a/source/gameengine/SceneGraph/SG_Tree.h
+++ b/source/gameengine/SceneGraph/SG_Tree.h
@@ -115,9 +115,7 @@ public:
#ifdef WITH_CXX_GUARDEDALLOC
-public:
- void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SG_Tree"); }
- void operator delete( void *mem ) { MEM_freeN(mem); }
+ MEM_CXX_CLASS_ALLOC_FUNCS("GE:SG_Tree")
#endif
};
@@ -158,9 +156,7 @@ public:
#ifdef WITH_CXX_GUARDEDALLOC
-public:
- void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SG_TreeFactory"); }
- void operator delete( void *mem ) { MEM_freeN(mem); }
+ MEM_CXX_CLASS_ALLOC_FUNCS("GE:SG_TreeFactory")
#endif
};