Index: include/core/SkRefCnt.h |
diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h |
index 9e8f3be61c33456de32384af7a25f84326d30989..de3d98b3c4d98f3891211df0ebdc7c6a2c21c3ea 100644 |
--- a/include/core/SkRefCnt.h |
+++ b/include/core/SkRefCnt.h |
@@ -249,8 +249,7 @@ public: |
* created sk_sp both have a reference to it. |
*/ |
sk_sp(const sk_sp<T>& that) : fPtr(SkSafeRef(that.get())) {} |
- template <typename U, |
- typename = skstd::enable_if_t<skstd::is_convertible<U, T>::value>> |
+ template <typename U, typename = skstd::enable_if_t<skstd::is_convertible<U*, T*>::value>> |
sk_sp(const sk_sp<U>& that) : fPtr(SkSafeRef(that.get())) {} |
/** |
@@ -259,8 +258,7 @@ public: |
* No call to ref() or unref() will be made. |
*/ |
sk_sp(sk_sp<T>&& that) : fPtr(that.release()) {} |
- template <typename U, |
- typename = skstd::enable_if_t<skstd::is_convertible<U, T>::value>> |
+ template <typename U, typename = skstd::enable_if_t<skstd::is_convertible<U*, T*>::value>> |
sk_sp(sk_sp<U>&& that) : fPtr(that.release()) {} |
/** |
@@ -287,8 +285,7 @@ public: |
this->reset(SkSafeRef(that.get())); |
return *this; |
} |
- template <typename U, |
- typename = skstd::enable_if_t<skstd::is_convertible<U, T>::value>> |
+ template <typename U, typename = skstd::enable_if_t<skstd::is_convertible<U*, T*>::value>> |
sk_sp<T>& operator=(const sk_sp<U>& that) { |
this->reset(SkSafeRef(that.get())); |
return *this; |
@@ -303,8 +300,7 @@ public: |
this->reset(that.release()); |
return *this; |
} |
- template <typename U, |
- typename = skstd::enable_if_t<skstd::is_convertible<U, T>::value>> |
+ template <typename U, typename = skstd::enable_if_t<skstd::is_convertible<U*, T*>::value>> |
sk_sp<T>& operator=(sk_sp<U>&& that) { |
this->reset(that.release()); |
return *this; |
@@ -356,7 +352,7 @@ public: |
} |
private: |
- T* fPtr; |
+ T* fPtr; |
}; |
template <typename T, typename... Args> |