Changeset 156931 in webkit
- Timestamp:
- Oct 4, 2013 5:26:12 PM (11 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r156910 r156931 1 2013-10-04 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> 2 3 Remove WTF smart pointers 'const_pointer_cast' 4 https://bugs.webkit.org/show_bug.cgi?id=122325 5 6 Reviewed by Darin Adler. 7 8 Removed WTF smart pointers 'const_pointer_cast' functions as: 9 - they were not used 10 - their implementation was wrong as they tried to cast to a different pointer type 11 12 * wtf/PassOwnPtr.h: 13 * wtf/PassRefPtr.h: 14 * wtf/RefPtr.h: 15 1 16 2013-10-04 Oliver Hunt <oliver@apple.com> 2 17 -
trunk/Source/WTF/wtf/PassOwnPtr.h
r155604 r156931 157 157 } 158 158 159 template<typename T, typename U> inline PassOwnPtr<T> const_pointer_cast(const PassOwnPtr<U>& p)160 {161 return adoptPtr(const_cast<T*>(p.leakPtr()));162 }163 164 159 template<typename T> inline T* getPtr(const PassOwnPtr<T>& p) 165 160 { … … 171 166 using WTF::PassOwnPtr; 172 167 using WTF::adoptPtr; 173 using WTF::const_pointer_cast;174 168 using WTF::static_pointer_cast; 175 169 -
trunk/Source/WTF/wtf/PassRefPtr.h
r155604 r156931 158 158 } 159 159 160 template<typename T, typename U> inline PassRefPtr<T> const_pointer_cast(const PassRefPtr<U>& p)161 {162 return adoptRef(const_cast<T*>(p.leakRef()));163 }164 165 160 template<typename T> inline T* getPtr(const PassRefPtr<T>& p) 166 161 { … … 173 168 using WTF::adoptRef; 174 169 using WTF::static_pointer_cast; 175 using WTF::const_pointer_cast;176 170 177 171 #endif // WTF_PassRefPtr_h -
trunk/Source/WTF/wtf/RefPtr.h
r155251 r156931 201 201 } 202 202 203 template<typename T, typename U> inline RefPtr<T> const_pointer_cast(const RefPtr<U>& p)204 {205 return RefPtr<T>(const_cast<T*>(p.get()));206 }207 208 203 template<typename T> inline T* getPtr(const RefPtr<T>& p) 209 204 { … … 215 210 using WTF::RefPtr; 216 211 using WTF::static_pointer_cast; 217 using WTF::const_pointer_cast;218 212 219 213 #endif // WTF_RefPtr_h
Note: See TracChangeset
for help on using the changeset viewer.