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

Unified Diff: sky/engine/wtf/RefPtr.h

Issue 719063002: Revert "Remove support for MSVC" (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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
Index: sky/engine/wtf/RefPtr.h
diff --git a/sky/engine/wtf/RefPtr.h b/sky/engine/wtf/RefPtr.h
index a8c17270608ff9595a3a310e7490e1fe2780ba01..5b0ea80ca50452738cc18f9a247c814b02d3ffbf 100644
--- a/sky/engine/wtf/RefPtr.h
+++ b/sky/engine/wtf/RefPtr.h
@@ -44,8 +44,10 @@ namespace WTF {
ALWAYS_INLINE RefPtr(const RefPtr& o) : m_ptr(o.m_ptr) { refIfNotNull(m_ptr); }
template<typename U> RefPtr(const RefPtr<U>& o, EnsurePtrConvertibleArgDecl(U, T)) : m_ptr(o.get()) { refIfNotNull(m_ptr); }
+#if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
RefPtr(RefPtr&& o) : m_ptr(o.m_ptr) { o.m_ptr = 0; }
RefPtr& operator=(RefPtr&&);
+#endif
// See comments in PassRefPtr.h for an explanation of why this takes a const reference.
template<typename U> RefPtr(const PassRefPtr<U>&, EnsurePtrConvertibleArgDecl(U, T));
@@ -106,6 +108,7 @@ namespace WTF {
return *this;
}
+#if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
template<typename T> inline RefPtr<T>& RefPtr<T>::operator=(RefPtr&& o)
{
// FIXME: Instead of explicitly casting to RefPtr&& here, we should use std::move, but that requires us to
@@ -114,6 +117,7 @@ namespace WTF {
swap(ptr);
return *this;
}
+#endif
template<typename T> template<typename U> inline RefPtr<T>& RefPtr<T>::operator=(const RefPtr<U>& o)
{

Powered by Google App Engine
This is Rietveld 408576698