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
This commit is contained in:
parent
2827106d7d
commit
147b881ca9
|
@ -82,9 +82,10 @@ public:
|
|||
|
||||
// Accessors
|
||||
|
||||
inline T& operator* () const { return *m_ptr; }
|
||||
inline T* operator-> () const { return m_ptr; }
|
||||
inline T* get() 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 explicit operator bool () const { return m_ptr != nullptr; }
|
||||
|
||||
// Operators
|
||||
|
||||
|
|
Loading…
Reference in New Issue