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

Side by Side Diff: third_party/WebKit/Source/wtf/PassRefPtr.h

Issue 2254073002: Remove WTF::static_pointer_cast functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reser ved. 2 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reser ved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 { 195 {
196 return b.get(); 196 return b.get();
197 } 197 }
198 198
199 template <typename T> PassRefPtr<T> adoptRef(T* p) 199 template <typename T> PassRefPtr<T> adoptRef(T* p)
200 { 200 {
201 adopted(p); 201 adopted(p);
202 return PassRefPtr<T>(p, PassRefPtr<T>::AdoptRef); 202 return PassRefPtr<T>(p, PassRefPtr<T>::AdoptRef);
203 } 203 }
204 204
205 template <typename T, typename U> inline PassRefPtr<T> static_pointer_cast(const PassRefPtr<U>& p)
206 {
207 return adoptRef(static_cast<T*>(p.leakRef()));
208 }
209
210 template <typename T> inline T* getPtr(const PassRefPtr<T>& p) 205 template <typename T> inline T* getPtr(const PassRefPtr<T>& p)
211 { 206 {
212 return p.get(); 207 return p.get();
213 } 208 }
214 209
215 } // namespace WTF 210 } // namespace WTF
216 211
217 using WTF::PassRefPtr; 212 using WTF::PassRefPtr;
218 using WTF::adoptRef; 213 using WTF::adoptRef;
219 using WTF::static_pointer_cast;
220 214
221 #endif // WTF_PassRefPtr_h 215 #endif // WTF_PassRefPtr_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/properties/SVGListPropertyHelper.h ('k') | third_party/WebKit/Source/wtf/RefPtr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698