From: Christos Tsantilas Date: Mon, 6 Dec 2010 14:11:46 +0000 (+0200) Subject: Remove the TidyPointer::deAllocator member does not really needed. Use X-Git-Tag: take1~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6f9bf73eae828bf5b1a350f744074e08507f8d3c;p=thirdparty%2Fsquid.git Remove the TidyPointer::deAllocator member does not really needed. Use directly the DeAllocator function given as template argument instead. --- diff --git a/src/base/TidyPointer.h b/src/base/TidyPointer.h index d6621902b3..4f50c85354 100644 --- a/src/base/TidyPointer.h +++ b/src/base/TidyPointer.h @@ -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