Merge "Add "operator bool" overload to android::sp."
This commit is contained in:
commit
28ebfe18fb
1 changed files with 4 additions and 3 deletions
|
|
@ -82,9 +82,10 @@ public:
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
|
|
||||||
inline T& operator* () const { return *m_ptr; }
|
inline T& operator* () const { return *m_ptr; }
|
||||||
inline T* operator-> () const { return m_ptr; }
|
inline T* operator-> () const { return m_ptr; }
|
||||||
inline T* get() const { return m_ptr; }
|
inline T* get() const { return m_ptr; }
|
||||||
|
inline explicit operator bool () const { return m_ptr != nullptr; }
|
||||||
|
|
||||||
// Operators
|
// Operators
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue