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

Unified Diff: base/win/scoped_comptr.h

Issue 748073004: Disable implicit conversion of scoped_refptr<T> to T* on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comptr too Created 6 years, 1 month 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
« base/memory/ref_counted.h ('K') | « base/memory/ref_counted.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/scoped_comptr.h
diff --git a/base/win/scoped_comptr.h b/base/win/scoped_comptr.h
index 98cea0ff4c8a45f8612cdab90e7882d85b7e25c1..373c0c3ba50985bb83c4a93b3626def6601a9977 100644
--- a/base/win/scoped_comptr.h
+++ b/base/win/scoped_comptr.h
@@ -133,8 +133,7 @@ class ScopedComPtr : public scoped_refptr<Interface> {
ScopedComPtr<IUnknown> other_identity;
other->QueryInterface(other_identity.Receive());
- return static_cast<IUnknown*>(my_identity) ==
- static_cast<IUnknown*>(other_identity);
+ return my_identity == other_identity;
}
// Provides direct access to the interface.
« base/memory/ref_counted.h ('K') | « base/memory/ref_counted.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698