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

Side by Side Diff: Source/wtf/HashMap.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/HashIterators.h ('k') | Source/wtf/HashMapTest.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, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2007, 2008, 2011 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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 inline bool HashMap<T, U, V, W, X, Y>::contains(KeyPeekInType key) const 324 inline bool HashMap<T, U, V, W, X, Y>::contains(KeyPeekInType key) const
325 { 325 {
326 return m_impl.contains(key); 326 return m_impl.contains(key);
327 } 327 }
328 328
329 template<typename T, typename U, typename V, typename W, typename X, typenam e Y> 329 template<typename T, typename U, typename V, typename W, typename X, typenam e Y>
330 template<typename HashTranslator, typename TYPE> 330 template<typename HashTranslator, typename TYPE>
331 inline typename HashMap<T, U, V, W, X, Y>::iterator 331 inline typename HashMap<T, U, V, W, X, Y>::iterator
332 HashMap<T, U, V, W, X, Y>::find(const TYPE& value) 332 HashMap<T, U, V, W, X, Y>::find(const TYPE& value)
333 { 333 {
334 return m_impl.template find<HashMapTranslatorAdapter<ValueTraits, HashTr anslator> >(value); 334 return m_impl.template find<HashMapTranslatorAdapter<ValueTraits, HashTr anslator>>(value);
335 } 335 }
336 336
337 template<typename T, typename U, typename V, typename W, typename X, typenam e Y> 337 template<typename T, typename U, typename V, typename W, typename X, typenam e Y>
338 template<typename HashTranslator, typename TYPE> 338 template<typename HashTranslator, typename TYPE>
339 inline typename HashMap<T, U, V, W, X, Y>::const_iterator 339 inline typename HashMap<T, U, V, W, X, Y>::const_iterator
340 HashMap<T, U, V, W, X, Y>::find(const TYPE& value) const 340 HashMap<T, U, V, W, X, Y>::find(const TYPE& value) const
341 { 341 {
342 return m_impl.template find<HashMapTranslatorAdapter<ValueTraits, HashTr anslator> >(value); 342 return m_impl.template find<HashMapTranslatorAdapter<ValueTraits, HashTr anslator>>(value);
343 } 343 }
344 344
345 template<typename T, typename U, typename V, typename W, typename X, typenam e Y> 345 template<typename T, typename U, typename V, typename W, typename X, typenam e Y>
346 template<typename HashTranslator, typename TYPE> 346 template<typename HashTranslator, typename TYPE>
347 inline bool 347 inline bool
348 HashMap<T, U, V, W, X, Y>::contains(const TYPE& value) const 348 HashMap<T, U, V, W, X, Y>::contains(const TYPE& value) const
349 { 349 {
350 return m_impl.template contains<HashMapTranslatorAdapter<ValueTraits, Ha shTranslator> >(value); 350 return m_impl.template contains<HashMapTranslatorAdapter<ValueTraits, Ha shTranslator>>(value);
351 } 351 }
352 352
353 template<typename T, typename U, typename V, typename W, typename X, typenam e Y> 353 template<typename T, typename U, typename V, typename W, typename X, typenam e Y>
354 typename HashMap<T, U, V, W, X, Y>::AddResult 354 typename HashMap<T, U, V, W, X, Y>::AddResult
355 HashMap<T, U, V, W, X, Y>::inlineAdd(KeyPeekInType key, MappedPassInReferenc eType mapped) 355 HashMap<T, U, V, W, X, Y>::inlineAdd(KeyPeekInType key, MappedPassInReferenc eType mapped)
356 { 356 {
357 return m_impl.template add<HashMapTranslator<ValueTraits, HashFunctions> >(key, mapped); 357 return m_impl.template add<HashMapTranslator<ValueTraits, HashFunctions> >(key, mapped);
358 } 358 }
359 359
360 template<typename T, typename U, typename V, typename W, typename X, typenam e Y> 360 template<typename T, typename U, typename V, typename W, typename X, typenam e Y>
361 typename HashMap<T, U, V, W, X, Y>::AddResult 361 typename HashMap<T, U, V, W, X, Y>::AddResult
362 HashMap<T, U, V, W, X, Y>::set(KeyPeekInType key, MappedPassInType mapped) 362 HashMap<T, U, V, W, X, Y>::set(KeyPeekInType key, MappedPassInType mapped)
363 { 363 {
364 AddResult result = inlineAdd(key, mapped); 364 AddResult result = inlineAdd(key, mapped);
365 if (!result.isNewEntry) { 365 if (!result.isNewEntry) {
366 // The inlineAdd call above found an existing hash table entry; we n eed to set the mapped value. 366 // The inlineAdd call above found an existing hash table entry; we n eed to set the mapped value.
367 MappedTraits::store(mapped, result.storedValue->value); 367 MappedTraits::store(mapped, result.storedValue->value);
368 } 368 }
369 return result; 369 return result;
370 } 370 }
371 371
372 template<typename T, typename U, typename V, typename W, typename X, typenam e Y> 372 template<typename T, typename U, typename V, typename W, typename X, typenam e Y>
373 template<typename HashTranslator, typename TYPE> 373 template<typename HashTranslator, typename TYPE>
374 typename HashMap<T, U, V, W, X, Y>::AddResult 374 typename HashMap<T, U, V, W, X, Y>::AddResult
375 HashMap<T, U, V, W, X, Y>::add(const TYPE& key, MappedPassInType value) 375 HashMap<T, U, V, W, X, Y>::add(const TYPE& key, MappedPassInType value)
376 { 376 {
377 return m_impl.template addPassingHashCode<HashMapTranslatorAdapter<Value Traits, HashTranslator> >(key, value); 377 return m_impl.template addPassingHashCode<HashMapTranslatorAdapter<Value Traits, HashTranslator>>(key, value);
378 } 378 }
379 379
380 template<typename T, typename U, typename V, typename W, typename X, typenam e Y> 380 template<typename T, typename U, typename V, typename W, typename X, typenam e Y>
381 typename HashMap<T, U, V, W, X, Y>::AddResult 381 typename HashMap<T, U, V, W, X, Y>::AddResult
382 HashMap<T, U, V, W, X, Y>::add(KeyPeekInType key, MappedPassInType mapped) 382 HashMap<T, U, V, W, X, Y>::add(KeyPeekInType key, MappedPassInType mapped)
383 { 383 {
384 return inlineAdd(key, mapped); 384 return inlineAdd(key, mapped);
385 } 385 }
386 386
387 template<typename T, typename U, typename V, typename W, typename X, typenam e Y> 387 template<typename T, typename U, typename V, typename W, typename X, typenam e Y>
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 vector.resize(collection.size()); 487 vector.resize(collection.size());
488 488
489 iterator it = collection.begin().values(); 489 iterator it = collection.begin().values();
490 iterator end = collection.end().values(); 490 iterator end = collection.end().values();
491 for (unsigned i = 0; it != end; ++it, ++i) 491 for (unsigned i = 0; it != end; ++it, ++i)
492 vector[i] = *it; 492 vector[i] = *it;
493 } 493 }
494 494
495 #if !ENABLE(OILPAN) 495 #if !ENABLE(OILPAN)
496 template<typename T, typename U, typename V, typename W, typename X> 496 template<typename T, typename U, typename V, typename W, typename X>
497 struct NeedsTracing<HashMap<T, U, V, W, X> > { 497 struct NeedsTracing<HashMap<T, U, V, W, X>> {
498 static const bool value = false; 498 static const bool value = false;
499 }; 499 };
500 #endif 500 #endif
501 501
502 } // namespace WTF 502 } // namespace WTF
503 503
504 using WTF::HashMap; 504 using WTF::HashMap;
505 505
506 #endif /* WTF_HashMap_h */ 506 #endif /* WTF_HashMap_h */
OLDNEW
« no previous file with comments | « Source/wtf/HashIterators.h ('k') | Source/wtf/HashMapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698