Merge branch 'frohlich/weak' into next
This commit is contained in:
commit
9cbbe55598
@ -98,6 +98,8 @@ public:
|
||||
private:
|
||||
void assign(T* p)
|
||||
{ get(p); put(); _ptr = p; }
|
||||
void assignNonRef(T* p)
|
||||
{ put(); _ptr = p; }
|
||||
|
||||
void get(const T* p) const
|
||||
{ T::get(p); }
|
||||
|
@ -27,6 +27,8 @@ public:
|
||||
{ }
|
||||
SGWeakPtr(const SGWeakPtr& p) : mWeakData(p.mWeakData)
|
||||
{ }
|
||||
SGWeakPtr(T* ptr)
|
||||
{ assign(ptr); }
|
||||
template<typename U>
|
||||
SGWeakPtr(const SGSharedPtr<U>& p)
|
||||
{ SGSharedPtr<T> sharedPtr = p; assign(sharedPtr.get()); }
|
||||
|
Loading…
Reference in New Issue
Block a user