Skip to content

Commit

Permalink
Disable implicit conversion of scoped_refptr<T> to T* on Windows.
Browse files Browse the repository at this point in the history
Finally!!!

BUG=110610

Review URL: https://codereview.chromium.org/748073004

Cr-Commit-Position: refs/heads/master@{#305558}
  • Loading branch information
zetafunction authored and Commit bot committed Nov 25, 2014
1 parent 6348198 commit 1c3841d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion base/memory/ref_counted.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "base/threading/thread_collision_warner.h"
#include "build/build_config.h"

#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_IOS) || defined(OS_ANDROID)
#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_IOS) || defined(OS_ANDROID) || defined(OS_WIN)
#define DISABLE_SCOPED_REFPTR_CONVERSION_OPERATOR
#endif

Expand Down
3 changes: 1 addition & 2 deletions base/win/scoped_comptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 1c3841d

Please sign in to comment.