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

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

Issue 23042005: [oilpan] Fix iterators over member collections to return Result<T> (Closed) Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Rebase Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/heap/tests/HeapTest.cpp ('k') | Source/wtf/HashTable.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 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 typedef typename ValueTraits::TraitType ValueType; 53 typedef typename ValueTraits::TraitType ValueType;
54 54
55 private: 55 private:
56 typedef HashTable<ValueType, ValueType, IdentityExtractor, 56 typedef HashTable<ValueType, ValueType, IdentityExtractor,
57 HashFunctions, ValueTraits, ValueTraits, Allocator> HashTableType; 57 HashFunctions, ValueTraits, ValueTraits, Allocator> HashTableType;
58 58
59 public: 59 public:
60 typedef typename Allocator::template IteratorWitness<HashSet>::Type Iter atorWitnessType; 60 typedef typename Allocator::template IteratorWitness<HashSet>::Type Iter atorWitnessType;
61 typedef typename Allocator::DefaultArgument DefaultWitnessType; 61 typedef typename Allocator::DefaultArgument DefaultWitnessType;
62 typedef HashTableConstIteratorAdapter<HashTableType, ValueType> iterator ; 62 typedef HashTableConstIteratorAdapter<HashTableType, ValueTraits> iterat or;
63 typedef HashTableConstIteratorAdapter<HashTableType, ValueType> const_it erator; 63 typedef HashTableConstIteratorAdapter<HashTableType, ValueTraits> const_ iterator;
64 typedef typename HashTableType::AddResult AddResult; 64 typedef typename HashTableType::AddResult AddResult;
65 65
66 void swap(HashSet&); 66 void swap(HashSet&);
67 67
68 int size() const; 68 int size() const;
69 int capacity() const; 69 int capacity() const;
70 bool isEmpty() const; 70 bool isEmpty() const;
71 71
72 iterator begin(IteratorWitnessType = DefaultWitnessType(0)) const; 72 iterator begin(IteratorWitnessType = DefaultWitnessType(0)) const;
73 iterator end(IteratorWitnessType = DefaultWitnessType(0)) const; 73 iterator end(IteratorWitnessType = DefaultWitnessType(0)) const;
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 iterator end = collection.end(); 277 iterator end = collection.end();
278 for (unsigned i = 0; it != end; ++it, ++i) 278 for (unsigned i = 0; it != end; ++it, ++i)
279 vector[i] = *it; 279 vector[i] = *it;
280 } 280 }
281 281
282 } // namespace WTF 282 } // namespace WTF
283 283
284 using WTF::HashSet; 284 using WTF::HashSet;
285 285
286 #endif /* WTF_HashSet_h */ 286 #endif /* WTF_HashSet_h */
OLDNEW
« no previous file with comments | « Source/heap/tests/HeapTest.cpp ('k') | Source/wtf/HashTable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698