[haiku-commits] Change in haiku[master]: BReference: add IsSet method

  • From: Gerrit <review@xxxxxxxxxxxxxxxxxxx>
  • To: waddlesplash <waddlesplash@xxxxxxxxx>, haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 9 Dec 2020 21:20:54 +0000

From X512 <danger_mail@xxxxxxx>:

X512 has uploaded this change for review. ( 
https://review.haiku-os.org/c/haiku/+/3487 ;)


Change subject: BReference: add IsSet method
......................................................................

BReference: add IsSet method

Change-Id: Ibc34dbde3b81faecdc7fe66a2c07fc33d7871ce2
---
M headers/os/support/Referenceable.h
1 file changed, 10 insertions(+), 0 deletions(-)



  git pull ssh://git.haiku-os.org:22/haiku refs/changes/87/3487/1

diff --git a/headers/os/support/Referenceable.h 
b/headers/os/support/Referenceable.h
index 5a4fff7..e7ab5d6 100644
--- a/headers/os/support/Referenceable.h
+++ b/headers/os/support/Referenceable.h
@@ -91,6 +91,11 @@
                }
        }

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

+       bool IsSet() const
+       {
+               return fReference.IsSet();
+       }
+
        const Type* Get() const
        {
                return fReference.Get();

--
To view, visit https://review.haiku-os.org/c/haiku/+/3487
To unsubscribe, or for help writing mail filters, visit 
https://review.haiku-os.org/settings

Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: Ibc34dbde3b81faecdc7fe66a2c07fc33d7871ce2
Gerrit-Change-Number: 3487
Gerrit-PatchSet: 1
Gerrit-Owner: X512 <danger_mail@xxxxxxx>
Gerrit-MessageType: newchange

Other related posts:

  • » [haiku-commits] Change in haiku[master]: BReference: add IsSet method - Gerrit