Style fixes. Thanks Axel and Ingo.

This commit is contained in:
czeidler
2012-01-06 09:35:33 +13:00
parent 430fc0e90c
commit b5c5640ec0
2 changed files with 17 additions and 16 deletions
+10 -9
View File
@@ -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;
}; };