Changeset 203306 in webkit
- Timestamp:
- Jul 15, 2016, 3:38:30 PM (10 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
wtf/ListHashSet.h (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r203304 r203306 1 2016-07-15 Chris Dumez <cdumez@apple.com> 2 3 Unreviewed, rolling out r203304. 4 5 This is wrong because of Node* entries in the internal HashMap 6 7 Reverted changeset: 8 9 "Add move constructor / assignment operator to ListHashSet" 10 https://bugs.webkit.org/show_bug.cgi?id=159837 11 http://trac.webkit.org/changeset/203304 12 1 13 2016-07-15 Chris Dumez <cdumez@apple.com> 2 14 -
trunk/Source/WTF/wtf/ListHashSet.h
r203304 r203306 20 20 */ 21 21 22 #pragma once 22 #ifndef WTF_ListHashSet_h 23 #define WTF_ListHashSet_h 23 24 24 25 #include <wtf/HashSet.h> … … 69 70 typedef HashTableAddResult<iterator> AddResult; 70 71 71 ListHashSet() = default;72 ListHashSet(); 72 73 ListHashSet(const ListHashSet&); 73 ListHashSet(ListHashSet&&) = default;74 74 ListHashSet& operator=(const ListHashSet&); 75 ListHashSet& operator=(ListHashSet&&) = default;76 75 ~ListHashSet(); 77 76 … … 151 150 152 151 HashTable<Node*, Node*, IdentityExtractor, NodeHash, NodeTraits, NodeTraits> m_impl; 153 Node* m_head { nullptr };154 Node* m_tail { nullptr };152 Node* m_head; 153 Node* m_tail; 155 154 }; 156 155 … … 161 160 ListHashSetNode(T&& value) 162 161 : m_value(std::forward<T>(value)) 162 , m_prev(0) 163 , m_next(0) 163 164 { 164 165 } 165 166 166 167 ValueArg m_value; 167 ListHashSetNode* m_prev { nullptr };168 ListHashSetNode* m_next { nullptr };168 ListHashSetNode* m_prev; 169 ListHashSetNode* m_next; 169 170 }; 170 171 … … 260 261 const_iterator& operator++() 261 262 { 262 ASSERT(m_position );263 ASSERT(m_position != 0); 263 264 m_position = m_position->m_next; 264 265 return *this; … … 307 308 308 309 template<typename T, typename U> 310 inline ListHashSet<T, U>::ListHashSet() 311 : m_head(0) 312 , m_tail(0) 313 { 314 } 315 316 template<typename T, typename U> 309 317 inline ListHashSet<T, U>::ListHashSet(const ListHashSet& other) 318 : m_head(0) 319 , m_tail(0) 310 320 { 311 321 for (auto it = other.begin(), end = other.end(); it != end; ++it) … … 593 603 deleteAllNodes(); 594 604 m_impl.clear(); 595 m_head = nullptr;596 m_tail = nullptr;605 m_head = 0; 606 m_tail = 0; 597 607 } 598 608 … … 628 638 { 629 639 node->m_prev = m_tail; 630 node->m_next = nullptr;640 node->m_next = 0; 631 641 632 642 if (m_tail) { … … 644 654 void ListHashSet<T, U>::prependNode(Node* node) 645 655 { 646 node->m_prev = nullptr;656 node->m_prev = 0; 647 657 node->m_next = m_head; 648 658 … … 677 687 return; 678 688 679 for (Node* node = m_head, *next = m_head->m_next; node; node = next, next = node ? node->m_next : nullptr)689 for (Node* node = m_head, *next = m_head->m_next; node; node = next, next = node ? node->m_next : 0) 680 690 delete node; 681 691 } … … 696 706 697 707 using WTF::ListHashSet; 708 709 #endif /* WTF_ListHashSet_h */
Note:
See TracChangeset
for help on using the changeset viewer.