]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Remove the TidyPointer::deAllocator member does not really needed. Use
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Mon, 6 Dec 2010 14:11:46 +0000 (16:11 +0200)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Mon, 6 Dec 2010 14:11:46 +0000 (16:11 +0200)
directly the DeAllocator function given as template argument instead.

src/base/TidyPointer.h

index d6621902b3ee9e4a741e0136e0973c34ad3f412b..4f50c8535473e9fd99d4810c2a2a4b5f1cbf1545 100644 (file)
@@ -17,7 +17,7 @@ public:
     /// Delete callback.
     typedef void DCB (T *t);
     TidyPointer(T *t = NULL)
-            :   raw(t), deAllocator(DeAllocator) {}
+            :   raw(t) {}
 public:
     bool operator !() const { return !raw; }
     /// Returns raw and possibly NULL pointer
@@ -48,12 +48,11 @@ private:
     /// Deallocate raw pointer. Become a nil pointer.
     void deletePointer() {
         if (raw) {
-            deAllocator(raw);
+            DeAllocator(raw);
         }
         raw = NULL;
     }
     T *raw; ///< pointer to T object or NULL
-    DCB *deAllocator; ///< cleanup function
 };
 
 /// DeAllocator for pointers that need free(3) from the std C library