Title: [167233] releases/WebKitGTK/webkit-2.4/Source/WTF
Revision
167233
Author
[email protected]
Date
2014-04-14 03:26:41 -0700 (Mon, 14 Apr 2014)

Log Message

Merge r165425 - Improve WeakPtr operators.
https://bugs.webkit.org/show_bug.cgi?id=130053

Reviewed by Andreas Kling.

Replace the "operator!()" with an explicit bool operator.  Add an "operator->()".

* wtf/WeakPtr.h:
(WTF::WeakPtr::operator bool):
(WTF::WeakPtr::operator->):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.4/Source/WTF/ChangeLog (167232 => 167233)


--- releases/WebKitGTK/webkit-2.4/Source/WTF/ChangeLog	2014-04-14 10:05:02 UTC (rev 167232)
+++ releases/WebKitGTK/webkit-2.4/Source/WTF/ChangeLog	2014-04-14 10:26:41 UTC (rev 167233)
@@ -1,3 +1,16 @@
+2014-03-10  Jer Noble  <[email protected]>
+
+        Improve WeakPtr operators.
+        https://bugs.webkit.org/show_bug.cgi?id=130053
+
+        Reviewed by Andreas Kling.
+
+        Replace the "operator!()" with an explicit bool operator.  Add an "operator->()".
+
+        * wtf/WeakPtr.h:
+        (WTF::WeakPtr::operator bool):
+        (WTF::WeakPtr::operator->):
+
 2014-02-19  Jon Honeycutt  <[email protected]>
 
         Crash in WTF::StringBuilder::append()

Modified: releases/WebKitGTK/webkit-2.4/Source/WTF/wtf/WeakPtr.h (167232 => 167233)


--- releases/WebKitGTK/webkit-2.4/Source/WTF/wtf/WeakPtr.h	2014-04-14 10:05:02 UTC (rev 167232)
+++ releases/WebKitGTK/webkit-2.4/Source/WTF/wtf/WeakPtr.h	2014-04-14 10:26:41 UTC (rev 167233)
@@ -100,8 +100,10 @@
     WeakPtr(PassRefPtr<WeakReference<T>> ref) : m_ref(ref) { }
 
     T* get() const { return m_ref->get(); }
-    bool operator!() const { return !m_ref->get(); }
+    explicit operator bool() const { return m_ref->get(); }
 
+    T* operator->() const { return m_ref->get(); }
+
 private:
     RefPtr<WeakReference<T>> m_ref;
 };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to