| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2008 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 return false; | 135 return false; |
| 136 | 136 |
| 137 unsigned oldVal = it->value; | 137 unsigned oldVal = it->value; |
| 138 DCHECK(oldVal); | 138 DCHECK(oldVal); |
| 139 unsigned newVal = oldVal - 1; | 139 unsigned newVal = oldVal - 1; |
| 140 if (newVal) { | 140 if (newVal) { |
| 141 it->value = newVal; | 141 it->value = newVal; |
| 142 return false; | 142 return false; |
| 143 } | 143 } |
| 144 | 144 |
| 145 m_impl.remove(it); | 145 m_impl.erase(it); |
| 146 return true; | 146 return true; |
| 147 } | 147 } |
| 148 | 148 |
| 149 template <typename T, typename U, typename V, typename W> | 149 template <typename T, typename U, typename V, typename W> |
| 150 inline void HashCountedSet<T, U, V, W>::removeAll(iterator it) { | 150 inline void HashCountedSet<T, U, V, W>::removeAll(iterator it) { |
| 151 if (it == end()) | 151 if (it == end()) |
| 152 return; | 152 return; |
| 153 | 153 |
| 154 m_impl.remove(it); | 154 m_impl.erase(it); |
| 155 } | 155 } |
| 156 | 156 |
| 157 template <typename Value, | 157 template <typename Value, |
| 158 typename HashFunctions, | 158 typename HashFunctions, |
| 159 typename Traits, | 159 typename Traits, |
| 160 typename Allocator, | 160 typename Allocator, |
| 161 typename VectorType> | 161 typename VectorType> |
| 162 inline void copyToVector( | 162 inline void copyToVector( |
| 163 const HashCountedSet<Value, HashFunctions, Traits, Allocator>& collection, | 163 const HashCountedSet<Value, HashFunctions, Traits, Allocator>& collection, |
| 164 VectorType& vector) { | 164 VectorType& vector) { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 179 Vector<T> vector; | 179 Vector<T> vector; |
| 180 copyToVector(*this, vector); | 180 copyToVector(*this, vector); |
| 181 return vector; | 181 return vector; |
| 182 } | 182 } |
| 183 | 183 |
| 184 } // namespace WTF | 184 } // namespace WTF |
| 185 | 185 |
| 186 using WTF::HashCountedSet; | 186 using WTF::HashCountedSet; |
| 187 | 187 |
| 188 #endif // WTF_HashCountedSet_h | 188 #endif // WTF_HashCountedSet_h |
| OLD | NEW |