summaryrefslogtreecommitdiff
path: root/AK
diff options
context:
space:
mode:
Diffstat (limited to 'AK')
-rw-r--r--AK/WeakPtr.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/AK/WeakPtr.h b/AK/WeakPtr.h
index 775c2dfee1..f5413ca6d6 100644
--- a/AK/WeakPtr.h
+++ b/AK/WeakPtr.h
@@ -35,6 +35,9 @@ public:
T& operator*() { return *ptr(); }
const T& operator*() const { return *ptr(); }
+ operator const T*() const { return ptr(); }
+ operator T*() { return ptr(); }
+
bool is_null() const { return !m_link || !m_link->ptr(); }
void clear() { m_link = nullptr; }