Style fixes. Thanks Axel and Ingo.
This commit is contained in:
@@ -136,8 +136,8 @@ public:
|
|||||||
|
|
||||||
Unset();
|
Unset();
|
||||||
|
|
||||||
if (other.Get()) {
|
if (other.PrivatePointer()) {
|
||||||
fPointer = const_cast<WeakPointer*>(other.Get());
|
fPointer = const_cast<WeakPointer*>(other.PrivatePointer());
|
||||||
fPointer->AcquireReference();
|
fPointer->AcquireReference();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -172,13 +172,6 @@ public:
|
|||||||
return BReference<Type>(object, true);
|
return BReference<Type>(object, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Do not use this if you do not know what you are doing. The WeakPointer
|
|
||||||
is for internal use only. */
|
|
||||||
const WeakPointer* Get() const
|
|
||||||
{
|
|
||||||
return fPointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
BWeakReference& operator=(const BWeakReference<Type>& other)
|
BWeakReference& operator=(const BWeakReference<Type>& other)
|
||||||
{
|
{
|
||||||
if (this == &other)
|
if (this == &other)
|
||||||
@@ -224,6 +217,14 @@ public:
|
|||||||
return fPointer != other.fPointer;
|
return fPointer != other.fPointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*! Do not use this if you do not know what you are doing. The WeakPointer
|
||||||
|
is for internal use only.
|
||||||
|
*/
|
||||||
|
const WeakPointer* PrivatePointer() const
|
||||||
|
{
|
||||||
|
return fPointer;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
WeakPointer* fPointer;
|
WeakPointer* fPointer;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user