[cig-commits] r5620 - in long/3D/Gale/trunk/src/StGermain: . Base/Foundation/src

walter at geodynamics.org walter at geodynamics.org
Fri Dec 22 06:06:29 PST 2006


Author: walter
Date: 2006-12-22 06:06:28 -0800 (Fri, 22 Dec 2006)
New Revision: 5620

Modified:
   long/3D/Gale/trunk/src/StGermain/
   long/3D/Gale/trunk/src/StGermain/Base/Foundation/src/shortcuts.h
Log:
 r3208 at earth (orig r3910):  LukeHodkinson | 2006-12-21 17:34:08 -0800
 Added some more macros to make inheritance easier
 and to reallocate a 2D array.
 



Property changes on: long/3D/Gale/trunk/src/StGermain
___________________________________________________________________
Name: svk:merge
   - 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:3196
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/branches/decomp3d/StGermain:3905
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3899
   + 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:3196
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/branches/decomp3d/StGermain:3910
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3899

Modified: long/3D/Gale/trunk/src/StGermain/Base/Foundation/src/shortcuts.h
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Base/Foundation/src/shortcuts.h	2006-12-22 14:06:24 UTC (rev 5619)
+++ long/3D/Gale/trunk/src/StGermain/Base/Foundation/src/shortcuts.h	2006-12-22 14:06:28 UTC (rev 5620)
@@ -51,11 +51,11 @@
 
 
 #ifndef NDEBUG
-#define VirtualCall( method, ... )			\
-	(assert( self ), (self)->method( __VA_ARGS__ )
+#define VirtualCall( self, method, ... )						\
+	(assert( self ), assert( (self)->method ), (self)->method( __VA_ARGS__ ))
 #else
-#define VirtualCall( method, ... )	\
-	(self)->method( __VA_ARGS )
+#define VirtualCall( self, method, ... )	\
+	(self)->method( __VA_ARGS__ )
 #endif
 
 
@@ -87,7 +87,12 @@
 		  (Memory_Free( ptr ), NULL)) : 			\
 	 ((size) ? Memory_Alloc_Array( type, size, name ) : NULL))
 
+#define ReallocArray2D( ptr, type, size0, size1 )						\
+	((ptr) ? ((size0 && size1) ? Memory_Realloc_2DArray( ptr, type, size0, size1 ) :	\
+		  (Memory_Free( ptr ), NULL)) : 						\
+	 (size0 && size1) ? Memory_Alloc_2DArray_Unnamed( type, size0, size1 ) : NULL)
 
+
 #define FreeArray( ptr )			\
 	if( ptr )				\
 		Memory_Free( ptr )



More information about the cig-commits mailing list