Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

qtcollider: SafePtr, remove locking mechanism

It was a bloat, only targeting a potential use case in the future.
If we ever need such locking, we better use/make another shared pointer
class anyway.
  • Loading branch information...
commit 61afba1647da87d27390059465db50b66584128f 1 parent d316dc4
@jleben jleben authored
Showing with 0 additions and 7 deletions.
  1. +0 −7 QtCollider/safeptr.hpp
View
7 QtCollider/safeptr.hpp
@@ -67,12 +67,6 @@ template<typename T> class SafePtr
void *id() const { return (void*) d; } // useful for checking internal pointer identity
- void lock() { if(d) d->mutex.lock(); }
-
- bool tryLock() { return d ? d->mutex.tryLock() : true; }
-
- void unlock() { if(d) d->mutex.unlock(); }
-
void invalidate() { qcDebugMsg(2,"SafePtr: invalidating"); if(d) d->ptr = 0; }
private:
@@ -80,7 +74,6 @@ template<typename T> class SafePtr
Data ( T * ptr_ ) : ptr(ptr_), refCount(1) {}
QAtomicPointer<T> ptr;
QAtomicInt refCount;
- QMutex mutex;
};
void ref() {
Please sign in to comment.
Something went wrong with that request. Please try again.