summaryrefslogtreecommitdiff
path: root/include/inspircd.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/inspircd.h')
-rw-r--r--include/inspircd.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/inspircd.h b/include/inspircd.h
index 209edf65a..f01305b44 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -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
*/