Changeset 156967 in webkit
- Timestamp:
- Oct 5, 2013 11:32:37 AM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r156965 r156967 1 2013-10-05 Darin Adler <darin@apple.com> 2 3 Remove COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES) since it's required now 4 https://bugs.webkit.org/show_bug.cgi?id=122387 5 6 Reviewed by Anders Carlsson. 7 8 * wtf/RefPtr.h: 9 * wtf/RetainPtr.h: 10 * wtf/Vector.h: 11 * wtf/text/AtomicString.h: 12 * wtf/text/WTFString.h: 13 Take out conditionals. 14 1 15 2013-10-05 Darin Adler <darin@apple.com> 2 16 -
trunk/Source/WTF/wtf/RefPtr.h
r156931 r156967 43 43 template<typename U> RefPtr(const RefPtr<U>& o) : m_ptr(o.get()) { refIfNotNull(m_ptr); } 44 44 45 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)46 45 ALWAYS_INLINE RefPtr(RefPtr&& o) : m_ptr(o.release().leakRef()) { } 47 46 template<typename U> RefPtr(RefPtr<U>&& o) : m_ptr(o.release().leakRef()) { } 48 #endif49 47 50 48 // See comments in PassRefPtr.h for an explanation of why this takes a const reference. … … 79 77 template<typename U> RefPtr& operator=(const RefPtr<U>&); 80 78 template<typename U> RefPtr& operator=(const PassRefPtr<U>&); 81 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)82 79 RefPtr& operator=(RefPtr&&); 83 80 template<typename U> RefPtr& operator=(RefPtr<U>&&); 84 #endif85 81 void swap(RefPtr&); 86 82 … … 138 134 } 139 135 140 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)141 142 136 template<typename T> inline RefPtr<T>& RefPtr<T>::operator=(RefPtr&& o) 143 137 { … … 153 147 return *this; 154 148 } 155 156 #endif157 149 158 150 template<class T> inline void RefPtr<T>::swap(RefPtr& o) -
trunk/Source/WTF/wtf/RetainPtr.h
r155604 r156967 102 102 RetainPtr(const RetainPtr& o) : m_ptr(o.m_ptr) { if (StorageType ptr = m_ptr) CFRetain(ptr); } 103 103 104 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)105 104 RetainPtr(RetainPtr&& o) : m_ptr(toStorageType(o.leakRef())) { } 106 105 template<typename U> RetainPtr(RetainPtr<U>&& o) : m_ptr(toStorageType(o.leakRef())) { } 107 #endif108 106 109 107 // Hash table deleted values, which are only constructed and never copied or destroyed. … … 135 133 template<typename U> RetainPtr& operator=(U*); 136 134 137 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)138 135 RetainPtr& operator=(RetainPtr&&); 139 136 template<typename U> RetainPtr& operator=(RetainPtr<U>&&); 140 #endif141 137 142 138 #if !COMPILER_SUPPORTS(CXX_NULLPTR) … … 225 221 } 226 222 227 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)228 229 223 template<typename T> inline RetainPtr<T>& RetainPtr<T>::operator=(RetainPtr&& o) 230 224 { … … 240 234 return *this; 241 235 } 242 243 #endif244 236 245 237 template<typename T> inline void RetainPtr<T>::swap(RetainPtr& o) -
trunk/Source/WTF/wtf/Vector.h
r156507 r156967 562 562 Vector& operator=(const Vector<T, otherCapacity, otherOverflowBehaviour>&); 563 563 564 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)565 564 Vector(Vector&&); 566 565 Vector& operator=(Vector&&); 567 #endif568 566 569 567 size_t size() const { return m_size; } … … 774 772 } 775 773 776 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)777 774 template<typename T, size_t inlineCapacity, typename OverflowHandler> 778 775 Vector<T, inlineCapacity, OverflowHandler>::Vector(Vector<T, inlineCapacity, OverflowHandler>&& other) … … 789 786 return *this; 790 787 } 791 #endif792 788 793 789 template<typename T, size_t inlineCapacity, typename OverflowHandler> -
trunk/Source/WTF/wtf/text/AtomicString.h
r156965 r156967 75 75 } 76 76 77 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)78 77 // We have to declare the copy constructor and copy assignment operator as well, otherwise 79 78 // they'll be implicitly deleted by adding the move constructor and move assignment operator. … … 82 81 AtomicString& operator=(const AtomicString& other) { m_string = other.m_string; return *this; } 83 82 AtomicString& operator=(AtomicString&& other) { m_string = std::move(other.m_string); return *this; } 84 #endif85 83 86 84 // Hash table deleted values, which are only constructed and never copied or destroyed. -
trunk/Source/WTF/wtf/text/WTFString.h
r156948 r156967 134 134 String(const char (&characters)[charactersCount], ConstructFromLiteralTag) : m_impl(StringImpl::createFromLiteral<charactersCount>(characters)) { } 135 135 136 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)137 136 // We have to declare the copy constructor and copy assignment operator as well, otherwise 138 137 // they'll be implicitly deleted by adding the move constructor and move assignment operator. … … 141 140 String& operator=(const String& other) { m_impl = other.m_impl; return *this; } 142 141 String& operator=(String&& other) { m_impl = other.m_impl.release(); return *this; } 143 #endif144 142 145 143 // Inline the destructor. -
trunk/Source/WebCore/ChangeLog
r156965 r156967 1 2013-10-05 Darin Adler <darin@apple.com> 2 3 Remove COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES) since it's required now 4 https://bugs.webkit.org/show_bug.cgi?id=122387 5 6 Reviewed by Anders Carlsson. 7 8 * html/canvas/CanvasStyle.h: Take out conditionals. 9 1 10 2013-10-05 Darin Adler <darin@apple.com> 2 11 -
trunk/Source/WebCore/html/canvas/CanvasStyle.h
r149928 r156967 73 73 CanvasStyle(const CanvasStyle&); 74 74 CanvasStyle& operator=(const CanvasStyle&); 75 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)76 75 CanvasStyle(CanvasStyle&&); 77 76 CanvasStyle& operator=(CanvasStyle&&); 78 #endif79 77 80 78 private: … … 142 140 } 143 141 144 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)145 142 inline CanvasStyle::CanvasStyle(CanvasStyle&& other) 146 143 { … … 157 154 return *this; 158 155 } 159 #endif160 156 161 157 } // namespace WebCore -
trunk/Source/WebKit2/ChangeLog
r156964 r156967 1 2013-10-05 Darin Adler <darin@apple.com> 2 3 Remove COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES) since it's required now 4 https://bugs.webkit.org/show_bug.cgi?id=122387 5 6 Reviewed by Anders Carlsson. 7 8 * UIProcess/API/cpp/WKRetainPtr.h: Take out conditionals. 9 1 10 2013-10-05 Darin Adler <darin@apple.com> 2 11 -
trunk/Source/WebKit2/UIProcess/API/cpp/WKRetainPtr.h
r101529 r156967 69 69 } 70 70 71 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)72 71 template<typename U> WKRetainPtr(WKRetainPtr<U>&& o) 73 72 : m_ptr(o.leakRef()) … … 79 78 { 80 79 } 81 #endif82 80 83 81 ~WKRetainPtr() … … 116 114 template<typename U> WKRetainPtr& operator=(U*); 117 115 118 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)119 116 WKRetainPtr& operator=(WKRetainPtr&&); 120 117 template<typename U> WKRetainPtr& operator=(WKRetainPtr<U>&&); 121 #endif122 118 123 119 void adopt(PtrType); … … 174 170 } 175 171 176 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)177 172 template<typename T> inline WKRetainPtr<T>& WKRetainPtr<T>::operator=(WKRetainPtr<T>&& o) 178 173 { … … 186 181 return *this; 187 182 } 188 #endif189 183 190 184 template<typename T> inline void WKRetainPtr<T>::adopt(PtrType optr)
Note: See TracChangeset
for help on using the changeset viewer.