From: Mikko Rasa Date: Tue, 7 Jun 2011 13:52:55 +0000 (+0300) Subject: Remove the old commented out MutexPtr implementation X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=e0b72720ebf599e67dd0fd793cdaf83be62db567;p=libs%2Fcore.git Remove the old commented out MutexPtr implementation --- diff --git a/source/core/mutex.h b/source/core/mutex.h index 050d00f..18f9039 100644 --- a/source/core/mutex.h +++ b/source/core/mutex.h @@ -70,31 +70,6 @@ private: T *data; }; -/*template -class MutexPtr: public RefCount -{ -public: - MutexPtr(T *d, Mutex &m): mutex(m), data(d) { mutex.lock(); } - MutexPtr(const MutexPtr &p): RefCount(p), mutex(p.mutex), data(p.data) { } - T &operator*() const { return *data; } - T *operator->() const { return data; } - void clear() { decref(); data = 0; } - ~MutexPtr() { decref(); } -protected: - Mutex &mutex; - T *data; - - bool decref() - { - if(!RefCount::decref()) - { - mutex.unlock(); - return false; - } - return true; - } -};*/ - } #endif