| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2011, Benjamin Poulain <ikipou@gmail.com> | 3 * Copyright (C) 2011, Benjamin Poulain <ikipou@gmail.com> |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 // Add the value to the beginning of the collection. If the value was al
ready in | 149 // Add the value to the beginning of the collection. If the value was al
ready in |
| 150 // the list, it is moved to the beginning. | 150 // the list, it is moved to the beginning. |
| 151 AddResult prependOrMoveToFirst(ValuePeekInType); | 151 AddResult prependOrMoveToFirst(ValuePeekInType); |
| 152 | 152 |
| 153 AddResult insertBefore(ValuePeekInType beforeValue, ValuePeekInType newV
alue); | 153 AddResult insertBefore(ValuePeekInType beforeValue, ValuePeekInType newV
alue); |
| 154 AddResult insertBefore(iterator, ValuePeekInType); | 154 AddResult insertBefore(iterator, ValuePeekInType); |
| 155 | 155 |
| 156 void remove(ValuePeekInType); | 156 void remove(ValuePeekInType); |
| 157 void remove(iterator); | 157 void remove(iterator); |
| 158 void clear(); | 158 void clear(); |
| 159 template<typename Collection> |
| 160 void removeAll(const Collection& other) { WTF::removeAll(*this, other);
} |
| 159 | 161 |
| 160 private: | 162 private: |
| 161 void unlink(Node*); | 163 void unlink(Node*); |
| 162 void unlinkAndDelete(Node*); | 164 void unlinkAndDelete(Node*); |
| 163 void appendNode(Node*); | 165 void appendNode(Node*); |
| 164 void prependNode(Node*); | 166 void prependNode(Node*); |
| 165 void insertNodeBefore(Node* beforeNode, Node* newNode); | 167 void insertNodeBefore(Node* beforeNode, Node* newNode); |
| 166 void deleteAllNodes(); | 168 void deleteAllNodes(); |
| 167 void createAllocatorIfNeeded(); | 169 void createAllocatorIfNeeded(); |
| 168 | 170 |
| (...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 968 inline void deleteAllValues(const ListHashSet<T, inlineCapacity, U>& collect
ion) | 970 inline void deleteAllValues(const ListHashSet<T, inlineCapacity, U>& collect
ion) |
| 969 { | 971 { |
| 970 deleteAllValues<true, typename ListHashSet<T, inlineCapacity, U>::ValueT
ype>(collection.m_impl); | 972 deleteAllValues<true, typename ListHashSet<T, inlineCapacity, U>::ValueT
ype>(collection.m_impl); |
| 971 } | 973 } |
| 972 | 974 |
| 973 } // namespace WTF | 975 } // namespace WTF |
| 974 | 976 |
| 975 using WTF::ListHashSet; | 977 using WTF::ListHashSet; |
| 976 | 978 |
| 977 #endif /* WTF_ListHashSet_h */ | 979 #endif /* WTF_ListHashSet_h */ |
| OLD | NEW |