diff options
| author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-09-13 20:35:38 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-09-13 20:35:38 +0000 |
| commit | 28ebfe18fb846ae034e3a45421d9d28c1c5f70db (patch) | |
| tree | 5101398df8aa56bc1393ea3eaf4e6eec60d70fe9 /libutils/include/utils/StrongPointer.h | |
| parent | 1f666a6be9c9e01ccdf3ac45f6f642e3d513676f (diff) | |
| parent | 147b881ca906ad3f7f1b9acf20304054df3e5ea1 (diff) | |
| download | system_core-28ebfe18fb846ae034e3a45421d9d28c1c5f70db.tar.gz system_core-28ebfe18fb846ae034e3a45421d9d28c1c5f70db.tar.bz2 system_core-28ebfe18fb846ae034e3a45421d9d28c1c5f70db.zip | |
Merge "Add "operator bool" overload to android::sp."
Diffstat (limited to 'libutils/include/utils/StrongPointer.h')
| -rw-r--r-- | libutils/include/utils/StrongPointer.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libutils/include/utils/StrongPointer.h b/libutils/include/utils/StrongPointer.h index 0c2060791..ae6d9c82e 100644 --- a/libutils/include/utils/StrongPointer.h +++ b/libutils/include/utils/StrongPointer.h @@ -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 |
