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

Side by Side Diff: Source/wtf/RetainPtr.h

Issue 835953003: Fix template angle bracket syntax (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « Source/wtf/RefVector.h ('k') | Source/wtf/SizeLimits.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 return RetainPtr<T>(AdoptNS, o); 272 return RetainPtr<T>(AdoptNS, o);
273 } 273 }
274 274
275 // Helper function for creating a RetainPtr using template argument deductio n. 275 // Helper function for creating a RetainPtr using template argument deductio n.
276 template<typename T> inline RetainPtr<T> retainPtr(T) WARN_UNUSED_RETURN; 276 template<typename T> inline RetainPtr<T> retainPtr(T) WARN_UNUSED_RETURN;
277 template<typename T> inline RetainPtr<T> retainPtr(T o) 277 template<typename T> inline RetainPtr<T> retainPtr(T o)
278 { 278 {
279 return RetainPtr<T>(o); 279 return RetainPtr<T>(o);
280 } 280 }
281 281
282 template<typename P> struct HashTraits<RetainPtr<P> > : SimpleClassHashTrait s<RetainPtr<P> > { }; 282 template<typename P> struct HashTraits<RetainPtr<P>> : SimpleClassHashTraits <RetainPtr<P>> { };
283 283
284 template<typename P> struct PtrHash<RetainPtr<P> > : PtrHash<typename Retain Ptr<P>::PtrType> { 284 template<typename P> struct PtrHash<RetainPtr<P>> : PtrHash<typename RetainP tr<P>::PtrType> {
285 using PtrHash<typename RetainPtr<P>::PtrType>::hash; 285 using PtrHash<typename RetainPtr<P>::PtrType>::hash;
286 static unsigned hash(const RetainPtr<P>& key) { return hash(key.get()); } 286 static unsigned hash(const RetainPtr<P>& key) { return hash(key.get()); }
287 using PtrHash<typename RetainPtr<P>::PtrType>::equal; 287 using PtrHash<typename RetainPtr<P>::PtrType>::equal;
288 static bool equal(const RetainPtr<P>& a, const RetainPtr<P>& b) { return a == b; } 288 static bool equal(const RetainPtr<P>& a, const RetainPtr<P>& b) { return a == b; }
289 static bool equal(typename RetainPtr<P>::PtrType a, const RetainPtr<P>& b) { return a == b; } 289 static bool equal(typename RetainPtr<P>::PtrType a, const RetainPtr<P>& b) { return a == b; }
290 static bool equal(const RetainPtr<P>& a, typename RetainPtr<P>::PtrType b) { return a == b; } 290 static bool equal(const RetainPtr<P>& a, typename RetainPtr<P>::PtrType b) { return a == b; }
291 }; 291 };
292 292
293 template<typename P> struct DefaultHash<RetainPtr<P> > { typedef PtrHash<Ret ainPtr<P> > Hash; }; 293 template<typename P> struct DefaultHash<RetainPtr<P>> { typedef PtrHash<Reta inPtr<P>> Hash; };
294 } // namespace WTF 294 } // namespace WTF
295 295
296 using WTF::AdoptCF; 296 using WTF::AdoptCF;
297 using WTF::AdoptNS; 297 using WTF::AdoptNS;
298 using WTF::adoptCF; 298 using WTF::adoptCF;
299 using WTF::adoptNS; 299 using WTF::adoptNS;
300 using WTF::RetainPtr; 300 using WTF::RetainPtr;
301 using WTF::retainPtr; 301 using WTF::retainPtr;
302 302
303 #endif // WTF_RetainPtr_h 303 #endif // WTF_RetainPtr_h
OLDNEW
« no previous file with comments | « Source/wtf/RefVector.h ('k') | Source/wtf/SizeLimits.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698