Make the weak pointer work. Some bits were left when importing.

Modified Files:
	SGSharedPtr.hxx SGWeakPtr.hxx
This commit is contained in:
frohlich
2009-09-16 05:04:05 +00:00
committed by Tim Moore
parent 0f7b65a921
commit 7e2dafdcb8
2 changed files with 4 additions and 0 deletions

View File

@@ -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); }

View File

@@ -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()); }