| 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 | 170 |
| 171 Value* storedValue; | 171 Value* storedValue; |
| 172 bool isNewEntry; | 172 bool isNewEntry; |
| 173 }; | 173 }; |
| 174 | 174 |
| 175 typedef typename HashTraits<Value>::PeekInType ValuePeekInType; | 175 typedef typename HashTraits<Value>::PeekInType ValuePeekInType; |
| 176 | 176 |
| 177 LinkedHashSet(); | 177 LinkedHashSet(); |
| 178 LinkedHashSet(const LinkedHashSet&); | 178 LinkedHashSet(const LinkedHashSet&); |
| 179 LinkedHashSet& operator=(const LinkedHashSet&); | 179 LinkedHashSet& operator=(const LinkedHashSet&); |
| 180 |
| 181 // Needs finalization. The anchor needs to unlink itself from the chain. |
| 180 ~LinkedHashSet(); | 182 ~LinkedHashSet(); |
| 181 | 183 |
| 182 static void finalize(void* pointer) { reinterpret_cast<LinkedHashSet*>(point
er)->~LinkedHashSet(); } | 184 static void finalize(void* pointer) { reinterpret_cast<LinkedHashSet*>(point
er)->~LinkedHashSet(); } |
| 183 | 185 |
| 184 void swap(LinkedHashSet&); | 186 void swap(LinkedHashSet&); |
| 185 | 187 |
| 186 unsigned size() const { return m_impl.size(); } | 188 unsigned size() const { return m_impl.size(); } |
| 187 unsigned capacity() const { return m_impl.capacity(); } | 189 unsigned capacity() const { return m_impl.capacity(); } |
| 188 bool isEmpty() const { return m_impl.isEmpty(); } | 190 bool isEmpty() const { return m_impl.isEmpty(); } |
| 189 | 191 |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 706 iterator end = set.end(); | 708 iterator end = set.end(); |
| 707 for (iterator it = set.begin(); it != end; ++it) | 709 for (iterator it = set.begin(); it != end; ++it) |
| 708 delete *it; | 710 delete *it; |
| 709 } | 711 } |
| 710 | 712 |
| 711 } | 713 } |
| 712 | 714 |
| 713 using WTF::LinkedHashSet; | 715 using WTF::LinkedHashSet; |
| 714 | 716 |
| 715 #endif /* WTF_LinkedHashSet_h */ | 717 #endif /* WTF_LinkedHashSet_h */ |
| OLD | NEW |