]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Change #define DELETE to a template
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 18 Aug 2006 23:13:14 +0000 (23:13 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 18 Aug 2006 23:13:14 +0000 (23:13 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4974 e03df62e-2008-0410-955e-edbf42e46eb7

include/inspircd.h

index 209edf65a4e0b771c82e6253bde48c11e528c241..f01305b4422bc4949b3fd35bc92f2d328d770e9e 100644 (file)
@@ -59,7 +59,11 @@ enum DebugLevel
 
 /** Delete a pointer, and NULL its value
  */
-#define DELETE(x) {if (x) { delete x; x = NULL; }}
+template<typename T> void DELETE(T* x)
+{
+       delete x;
+       x = NULL;
+}
 
 /** Template function to convert any input type to std::string
  */