| Index: Source/wtf/RawPtr.h
|
| diff --git a/Source/wtf/RawPtr.h b/Source/wtf/RawPtr.h
|
| index 8c111eafeaad4086755b00e3211ba56de2f67afa..92ed528412176cf40e8611d91501c36c7b7bbaab 100644
|
| --- a/Source/wtf/RawPtr.h
|
| +++ b/Source/wtf/RawPtr.h
|
| @@ -45,9 +45,12 @@ class RawPtr {
|
| public:
|
| RawPtr() : m_ptr(0) { }
|
| RawPtr(T* ptr) : m_ptr(ptr) { }
|
| -
|
| + RawPtr(const RawPtr& other)
|
| + : m_ptr(other.get())
|
| + {
|
| + }
|
| template<typename U>
|
| - explicit RawPtr(const RawPtr<U>& other)
|
| + RawPtr(const RawPtr<U>& other)
|
| : m_ptr(other.get())
|
| {
|
| }
|
| @@ -68,12 +71,20 @@ public:
|
| return ptr;
|
| }
|
|
|
| - RawPtr& operator=(T* ptr)
|
| + template<typename U>
|
| + RawPtr& operator=(U* ptr)
|
| {
|
| m_ptr = ptr;
|
| return *this;
|
| }
|
|
|
| + template<typename U>
|
| + RawPtr& operator=(RawPtr<U> ptr)
|
| + {
|
| + m_ptr = ptr.get();
|
| + return *this;
|
| + }
|
| +
|
| operator T*() const { return m_ptr; }
|
| T& operator*() const { return *m_ptr; }
|
| T* operator->() const { return m_ptr; }
|
|
|