| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights | 2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * Copyright (C) 2011, Benjamin Poulain <ikipou@gmail.com> | 4 * Copyright (C) 2011, Benjamin Poulain <ikipou@gmail.com> |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 // already in the list, it is moved to the beginning. | 205 // already in the list, it is moved to the beginning. |
| 206 template <typename IncomingValueType> | 206 template <typename IncomingValueType> |
| 207 AddResult prependOrMoveToFirst(IncomingValueType&&); | 207 AddResult prependOrMoveToFirst(IncomingValueType&&); |
| 208 | 208 |
| 209 template <typename IncomingValueType> | 209 template <typename IncomingValueType> |
| 210 AddResult insertBefore(ValuePeekInType beforeValue, | 210 AddResult insertBefore(ValuePeekInType beforeValue, |
| 211 IncomingValueType&& newValue); | 211 IncomingValueType&& newValue); |
| 212 template <typename IncomingValueType> | 212 template <typename IncomingValueType> |
| 213 AddResult insertBefore(iterator, IncomingValueType&&); | 213 AddResult insertBefore(iterator, IncomingValueType&&); |
| 214 | 214 |
| 215 void remove(ValuePeekInType value) { return remove(find(value)); } | 215 void erase(ValuePeekInType value) { return erase(find(value)); } |
| 216 void remove(iterator); | 216 void erase(iterator); |
| 217 void clear(); | 217 void clear(); |
| 218 template <typename Collection> | 218 template <typename Collection> |
| 219 void removeAll(const Collection& other) { | 219 void removeAll(const Collection& other) { |
| 220 WTF::removeAll(*this, other); | 220 WTF::removeAll(*this, other); |
| 221 } | 221 } |
| 222 | 222 |
| 223 ValueType take(iterator); | 223 ValueType take(iterator); |
| 224 ValueType take(ValuePeekInType); | 224 ValueType take(ValuePeekInType); |
| 225 ValueType takeFirst(); | 225 ValueType takeFirst(); |
| 226 | 226 |
| (...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 986 typename ListHashSet<T, inlineCapacity, U, V>::AddResult | 986 typename ListHashSet<T, inlineCapacity, U, V>::AddResult |
| 987 ListHashSet<T, inlineCapacity, U, V>::insertBefore( | 987 ListHashSet<T, inlineCapacity, U, V>::insertBefore( |
| 988 ValuePeekInType beforeValue, | 988 ValuePeekInType beforeValue, |
| 989 IncomingValueType&& newValue) { | 989 IncomingValueType&& newValue) { |
| 990 createAllocatorIfNeeded(); | 990 createAllocatorIfNeeded(); |
| 991 return insertBefore(find(beforeValue), | 991 return insertBefore(find(beforeValue), |
| 992 std::forward<IncomingValueType>(newValue)); | 992 std::forward<IncomingValueType>(newValue)); |
| 993 } | 993 } |
| 994 | 994 |
| 995 template <typename T, size_t inlineCapacity, typename U, typename V> | 995 template <typename T, size_t inlineCapacity, typename U, typename V> |
| 996 inline void ListHashSet<T, inlineCapacity, U, V>::remove(iterator it) { | 996 inline void ListHashSet<T, inlineCapacity, U, V>::erase(iterator it) { |
| 997 if (it == end()) | 997 if (it == end()) |
| 998 return; | 998 return; |
| 999 m_impl.remove(it.getNode()); | 999 m_impl.remove(it.getNode()); |
| 1000 unlinkAndDelete(it.getNode()); | 1000 unlinkAndDelete(it.getNode()); |
| 1001 } | 1001 } |
| 1002 | 1002 |
| 1003 template <typename T, size_t inlineCapacity, typename U, typename V> | 1003 template <typename T, size_t inlineCapacity, typename U, typename V> |
| 1004 inline void ListHashSet<T, inlineCapacity, U, V>::clear() { | 1004 inline void ListHashSet<T, inlineCapacity, U, V>::clear() { |
| 1005 deleteAllNodes(); | 1005 deleteAllNodes(); |
| 1006 m_impl.clear(); | 1006 m_impl.clear(); |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1126 // through the HashTable. That includes m_head and m_tail so we do not have | 1126 // through the HashTable. That includes m_head and m_tail so we do not have |
| 1127 // to explicitly trace them here. | 1127 // to explicitly trace them here. |
| 1128 m_impl.trace(visitor); | 1128 m_impl.trace(visitor); |
| 1129 } | 1129 } |
| 1130 | 1130 |
| 1131 } // namespace WTF | 1131 } // namespace WTF |
| 1132 | 1132 |
| 1133 using WTF::ListHashSet; | 1133 using WTF::ListHashSet; |
| 1134 | 1134 |
| 1135 #endif // WTF_ListHashSet_h | 1135 #endif // WTF_ListHashSet_h |
| OLD | NEW |