From 7dd3646382a9eaf29694142090a83a6435bf88f4 Mon Sep 17 00:00:00 2001 From: rich_sposato Date: Wed, 19 Mar 2008 18:39:50 +0000 Subject: [PATCH] Added more comments. git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@839 7ec92016-0320-0410-acc4-a06ded1c099a --- include/loki/Allocator.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/loki/Allocator.h b/include/loki/Allocator.h index 40efc8d..3bab337 100644 --- a/include/loki/Allocator.h +++ b/include/loki/Allocator.h @@ -117,6 +117,10 @@ public: /// Destruct the object at pointer. void destroy( pointer p ) { + // If the Type has no destructor, then some compilers complain about + // an unreferenced parameter, so use the void cast trick to prevent + // spurious warnings. + (void)p; p->~Type(); }