Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1960)

Unified Diff: Source/wtf/PassRefPtr.h

Issue 267303004: Oilpan: cleanup based on review comments after removal of TreeShared. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/wtf/PassRefPtr.h
diff --git a/Source/wtf/PassRefPtr.h b/Source/wtf/PassRefPtr.h
index 1d21a538bf53329ca589d9de5783c4c86d614c51..821de5b29a221e6889f004180bb260f423a1a5b7 100644
--- a/Source/wtf/PassRefPtr.h
+++ b/Source/wtf/PassRefPtr.h
@@ -138,6 +138,16 @@ namespace WTF {
return a == b.get();
}
+ template<typename T, typename U> inline bool operator==(const PassRefPtr<T>& a, const U& b)
+ {
+ return a.get() == &b;
+ }
+
+ template<typename T, typename U> inline bool operator==(const T& a, const PassRefPtr<U>& b)
+ {
+ return &a == b.get();
+ }
+
template<typename T, typename U> inline bool operator==(const PassRefPtr<T>& a, const RawPtr<U>& b)
{
return a.get() == b.get();
@@ -173,6 +183,16 @@ namespace WTF {
return a != b.get();
}
+ template<typename T, typename U> inline bool operator!=(const PassRefPtr<T>& a, const U& b)
+ {
+ return a.get() != &b;
+ }
+
+ template<typename T, typename U> inline bool operator!=(const T& a, const PassRefPtr<U>& b)
+ {
+ return &a != b.get();
+ }
+
template<typename T, typename U> inline bool operator!=(const PassRefPtr<T>& a, const RawPtr<U>& b)
{
return a.get() != b.get();

Powered by Google App Engine
This is Rietveld 408576698