BReference: add IsSet method

Change-Id: Ibc34dbde3b81faecdc7fe66a2c07fc33d7871ce2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3487
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
X512 2020-12-10 03:02:39 +09:00 committed by Jérôme Duval
parent d1ca0fcc6a
commit c46f51fb45

View File

@ -91,6 +91,11 @@ public:
} }
} }
bool IsSet() const
{
return fObject != NULL;
}
Type* Get() const Type* Get() const
{ {
return fObject; return fObject;
@ -197,6 +202,11 @@ public:
fReference.Unset(); fReference.Unset();
} }
bool IsSet() const
{
return fReference.IsSet();
}
const Type* Get() const const Type* Get() const
{ {
return fReference.Get(); return fReference.Get();