Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 147b881c authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Add "operator bool" overload to android::sp.

This matches the overload on std::unique_ptr and friends.

Test: builds, boots
Bug: 13758960
Change-Id: Ieed9faa6b162c2a10fa7cf2b135c9b17564f6c88
parent 2827106d
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -85,6 +85,7 @@ public:
    inline T&       operator* () const     { return *m_ptr; }
    inline T*       operator-> () const    { return m_ptr;  }
    inline T*       get() const            { return m_ptr; }
    inline explicit operator bool () const { return m_ptr != nullptr; }

    // Operators