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

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

Issue 1968043002: Get rid of 'PassInType' in hash traits and containers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 7 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 | « third_party/WebKit/Source/wtf/HashSet.h ('k') | third_party/WebKit/Source/wtf/HashTraits.h » ('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, 2012 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2008 David Levin <levin@chromium.org> 3 * Copyright (C) 2008 David Levin <levin@chromium.org>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 // allowed unless you supply custom key traits. 346 // allowed unless you supply custom key traits.
347 template <typename Key, typename Value, typename Extractor, typename HashFunctio ns, typename Traits, typename KeyTraits, typename Allocator> 347 template <typename Key, typename Value, typename Extractor, typename HashFunctio ns, typename Traits, typename KeyTraits, typename Allocator>
348 class HashTable final : public ConditionalDestructor<HashTable<Key, Value, Extra ctor, HashFunctions, Traits, KeyTraits, Allocator>, Allocator::isGarbageCollecte d> { 348 class HashTable final : public ConditionalDestructor<HashTable<Key, Value, Extra ctor, HashFunctions, Traits, KeyTraits, Allocator>, Allocator::isGarbageCollecte d> {
349 DISALLOW_NEW(); 349 DISALLOW_NEW();
350 public: 350 public:
351 typedef HashTableIterator<Key, Value, Extractor, HashFunctions, Traits, KeyT raits, Allocator> iterator; 351 typedef HashTableIterator<Key, Value, Extractor, HashFunctions, Traits, KeyT raits, Allocator> iterator;
352 typedef HashTableConstIterator<Key, Value, Extractor, HashFunctions, Traits, KeyTraits, Allocator> const_iterator; 352 typedef HashTableConstIterator<Key, Value, Extractor, HashFunctions, Traits, KeyTraits, Allocator> const_iterator;
353 typedef Traits ValueTraits; 353 typedef Traits ValueTraits;
354 typedef Key KeyType; 354 typedef Key KeyType;
355 typedef typename KeyTraits::PeekInType KeyPeekInType; 355 typedef typename KeyTraits::PeekInType KeyPeekInType;
356 typedef typename KeyTraits::PassInType KeyPassInType;
357 typedef Value ValueType; 356 typedef Value ValueType;
358 typedef Extractor ExtractorType; 357 typedef Extractor ExtractorType;
359 typedef KeyTraits KeyTraitsType; 358 typedef KeyTraits KeyTraitsType;
360 typedef typename Traits::PassInType ValuePassInType;
361 typedef IdentityHashTranslator<HashFunctions> IdentityTranslatorType; 359 typedef IdentityHashTranslator<HashFunctions> IdentityTranslatorType;
362 typedef HashTableAddResult<HashTable, ValueType> AddResult; 360 typedef HashTableAddResult<HashTable, ValueType> AddResult;
363 361
364 #if DUMP_HASHTABLE_STATS_PER_TABLE 362 #if DUMP_HASHTABLE_STATS_PER_TABLE
365 struct Stats { 363 struct Stats {
366 DISALLOW_NEW(Stats); 364 DISALLOW_NEW(Stats);
367 Stats() 365 Stats()
368 : numAccesses(0) 366 : numAccesses(0)
369 , numRehashes(0) 367 , numRehashes(0)
370 , numRemoves(0) 368 , numRemoves(0)
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after
1522 CollectionIterator end(toBeRemoved.end()); 1520 CollectionIterator end(toBeRemoved.end());
1523 for (CollectionIterator it(toBeRemoved.begin()); it != end; ++it) 1521 for (CollectionIterator it(toBeRemoved.begin()); it != end; ++it)
1524 collection.remove(*it); 1522 collection.remove(*it);
1525 } 1523 }
1526 1524
1527 } // namespace WTF 1525 } // namespace WTF
1528 1526
1529 #include "wtf/HashIterators.h" 1527 #include "wtf/HashIterators.h"
1530 1528
1531 #endif // WTF_HashTable_h 1529 #endif // WTF_HashTable_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/HashSet.h ('k') | third_party/WebKit/Source/wtf/HashTraits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698