summaryrefslogtreecommitdiff
path: root/AK/OwnPtr.h
diff options
context:
space:
mode:
Diffstat (limited to 'AK/OwnPtr.h')
-rw-r--r--AK/OwnPtr.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/AK/OwnPtr.h b/AK/OwnPtr.h
index 1988b7169e..828aca3110 100644
--- a/AK/OwnPtr.h
+++ b/AK/OwnPtr.h
@@ -66,9 +66,6 @@ public:
bool operator!() const { return !m_ptr; }
- typedef T* OwnPtr::*UnspecifiedBoolType;
- operator UnspecifiedBoolType() const { return m_ptr ? &OwnPtr::m_ptr : nullptr; }
-
T* leak_ptr()
{
T* leakedPtr = m_ptr;
@@ -85,6 +82,9 @@ public:
T& operator*() { return *m_ptr; }
const T& operator*() const { return *m_ptr; }
+ operator const T*() const { return m_ptr; }
+ operator T*() { return m_ptr; }
+
operator bool() { return !!m_ptr; }
private: