| OLD | NEW |
| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 public: | 55 public: |
| 56 typedef HashTableConstIteratorAdapter<HashTableType, ValueTraits> iterator; | 56 typedef HashTableConstIteratorAdapter<HashTableType, ValueTraits> iterator; |
| 57 typedef HashTableConstIteratorAdapter<HashTableType, ValueTraits> const_iter
ator; | 57 typedef HashTableConstIteratorAdapter<HashTableType, ValueTraits> const_iter
ator; |
| 58 typedef typename HashTableType::AddResult AddResult; | 58 typedef typename HashTableType::AddResult AddResult; |
| 59 | 59 |
| 60 void swap(HashSet& ref) | 60 void swap(HashSet& ref) |
| 61 { | 61 { |
| 62 m_impl.swap(ref.m_impl); | 62 m_impl.swap(ref.m_impl); |
| 63 } | 63 } |
| 64 | 64 |
| 65 void swap(typename Allocator::template OtherType<HashSet>::Type other) | |
| 66 { | |
| 67 HashSet& ref = Allocator::getOther(other); | |
| 68 m_impl.swap(ref.m_impl); | |
| 69 } | |
| 70 | |
| 71 unsigned size() const; | 65 unsigned size() const; |
| 72 unsigned capacity() const; | 66 unsigned capacity() const; |
| 73 bool isEmpty() const; | 67 bool isEmpty() const; |
| 74 | 68 |
| 75 void reserveCapacityForSize(unsigned size) | 69 void reserveCapacityForSize(unsigned size) |
| 76 { | 70 { |
| 77 m_impl.reserveCapacityForSize(size); | 71 m_impl.reserveCapacityForSize(size); |
| 78 } | 72 } |
| 79 | 73 |
| 80 iterator begin() const; | 74 iterator begin() const; |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 iterator end = collection.end(); | 263 iterator end = collection.end(); |
| 270 for (unsigned i = 0; it != end; ++it, ++i) | 264 for (unsigned i = 0; it != end; ++it, ++i) |
| 271 vector[i] = *it; | 265 vector[i] = *it; |
| 272 } | 266 } |
| 273 | 267 |
| 274 } // namespace WTF | 268 } // namespace WTF |
| 275 | 269 |
| 276 using WTF::HashSet; | 270 using WTF::HashSet; |
| 277 | 271 |
| 278 #endif // WTF_HashSet_h | 272 #endif // WTF_HashSet_h |
| OLD | NEW |