[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48261] trunk/blender: add in C++ alloc replacements for array allocations & fix unterminated ifdef in last commit .

Campbell Barton ideasman42 at gmail.com
Mon Jun 25 11:20:26 CEST 2012


Revision: 48261
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48261
Author:   campbellbarton
Date:     2012-06-25 09:20:25 +0000 (Mon, 25 Jun 2012)
Log Message:
-----------
add in C++ alloc replacements for array allocations & fix unterminated ifdef in last commit.

Modified Paths:
--------------
    trunk/blender/intern/guardedalloc/MEM_guardedalloc.h
    trunk/blender/source/gameengine/Converter/KX_BlenderScalarInterpolator.h

Modified: trunk/blender/intern/guardedalloc/MEM_guardedalloc.h
===================================================================
--- trunk/blender/intern/guardedalloc/MEM_guardedalloc.h	2012-06-25 09:14:37 UTC (rev 48260)
+++ trunk/blender/intern/guardedalloc/MEM_guardedalloc.h	2012-06-25 09:20:25 UTC (rev 48261)
@@ -178,6 +178,12 @@
 	void operator delete(void *mem) {                                         \
 		MEM_freeN(mem);                                                       \
 	}                                                                         \
+	void *operator new[](size_t num_bytes) {                                  \
+		return MEM_mallocN(num_bytes, _id "[]");                              \
+	}                                                                         \
+	void operator delete[](void *mem) {                                       \
+		MEM_freeN(mem);                                                       \
+	}                                                                         \
 
 #endif
 

Modified: trunk/blender/source/gameengine/Converter/KX_BlenderScalarInterpolator.h
===================================================================
--- trunk/blender/source/gameengine/Converter/KX_BlenderScalarInterpolator.h	2012-06-25 09:14:37 UTC (rev 48260)
+++ trunk/blender/source/gameengine/Converter/KX_BlenderScalarInterpolator.h	2012-06-25 09:20:25 UTC (rev 48261)
@@ -56,6 +56,7 @@
 
 #ifdef WITH_CXX_GUARDEDALLOC
 	MEM_CXX_CLASS_ALLOC_FUNCS("GE:BL_ScalarInterpolator")
+#endif
 };
 
 




More information about the Bf-blender-cvs mailing list