We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8379b87 commit 0ec433eCopy full SHA for 0ec433e
Userland/Libraries/LibJS/Heap/GCPtr.h
@@ -52,6 +52,7 @@ class NonnullGCPtr {
52
NonnullGCPtr& operator=(GCPtr<T> const& other)
53
{
54
m_ptr = const_cast<T*>(other.ptr());
55
+ VERIFY(m_ptr);
56
return *this;
57
}
58
@@ -186,8 +187,18 @@ class GCPtr {
186
187
188
189
- T* operator->() const { return m_ptr; }
190
- T& operator*() const { return *m_ptr; }
+ T* operator->() const
191
+ {
192
193
+ return m_ptr;
194
+ }
195
+
196
+ T& operator*() const
197
198
199
+ return *m_ptr;
200
201
202
T* ptr() const { return m_ptr; }
203
204
operator bool() const { return !!m_ptr; }
0 commit comments