| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 } | 90 } |
| 91 | 91 |
| 92 void swap(typename Allocator::template OtherType<HashMap>::Type other) | 92 void swap(typename Allocator::template OtherType<HashMap>::Type other) |
| 93 { | 93 { |
| 94 HashMap& ref = Allocator::getOther(other); | 94 HashMap& ref = Allocator::getOther(other); |
| 95 m_impl.swap(ref.m_impl); | 95 m_impl.swap(ref.m_impl); |
| 96 } | 96 } |
| 97 | 97 |
| 98 unsigned size() const; | 98 unsigned size() const; |
| 99 unsigned capacity() const; | 99 unsigned capacity() const; |
| 100 void reserveCapacityForSize(unsigned size) |
| 101 { |
| 102 m_impl.reserveCapacityForSize(size); |
| 103 } |
| 104 |
| 100 bool isEmpty() const; | 105 bool isEmpty() const; |
| 101 | 106 |
| 102 // iterators iterate over pairs of keys and values | 107 // iterators iterate over pairs of keys and values |
| 103 iterator begin(); | 108 iterator begin(); |
| 104 iterator end(); | 109 iterator end(); |
| 105 const_iterator begin() const; | 110 const_iterator begin() const; |
| 106 const_iterator end() const; | 111 const_iterator end() const; |
| 107 | 112 |
| 108 HashMapKeysProxy& keys() { return static_cast<HashMapKeysProxy&>(*this); } | 113 HashMapKeysProxy& keys() { return static_cast<HashMapKeysProxy&>(*this); } |
| 109 const HashMapKeysProxy& keys() const { return static_cast<const HashMapKeysP
roxy&>(*this); } | 114 const HashMapKeysProxy& keys() const { return static_cast<const HashMapKeysP
roxy&>(*this); } |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 struct NeedsTracing<HashMap<T, U, V, W, X>> { | 507 struct NeedsTracing<HashMap<T, U, V, W, X>> { |
| 503 static const bool value = false; | 508 static const bool value = false; |
| 504 }; | 509 }; |
| 505 #endif | 510 #endif |
| 506 | 511 |
| 507 } // namespace WTF | 512 } // namespace WTF |
| 508 | 513 |
| 509 using WTF::HashMap; | 514 using WTF::HashMap; |
| 510 | 515 |
| 511 #endif // WTF_HashMap_h | 516 #endif // WTF_HashMap_h |
| OLD | NEW |