]> git.tdb.fi Git - libs/core.git/commitdiff
Remove the old commented out MutexPtr implementation
authorMikko Rasa <tdb@tdb.fi>
Tue, 7 Jun 2011 13:52:55 +0000 (16:52 +0300)
committerMikko Rasa <tdb@tdb.fi>
Tue, 7 Jun 2011 13:52:55 +0000 (16:52 +0300)
source/core/mutex.h

index 050d00f808a6d42f29e8cbf14744e935bad604d4..18f9039227e1feb19e7860811e7487a2338dfd9a 100644 (file)
@@ -70,31 +70,6 @@ private:
        T *data;
 };
 
-/*template<typename T>
-class MutexPtr: public RefCount
-{
-public:
-       MutexPtr(T *d, Mutex &m): mutex(m), data(d) { mutex.lock(); }
-       MutexPtr(const MutexPtr<T> &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