| 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) 2008 David Levin <levin@chromium.org> | 4 * Copyright (C) 2008 David Levin <levin@chromium.org> |
| 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 1648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1659 DCHECK_NE(&table_[i], entry); | 1659 DCHECK_NE(&table_[i], entry); |
| 1660 if (Traits::kEmptyValueIsZero) { | 1660 if (Traits::kEmptyValueIsZero) { |
| 1661 memset(&temporary_table[i], 0, sizeof(ValueType)); | 1661 memset(&temporary_table[i], 0, sizeof(ValueType)); |
| 1662 } else { | 1662 } else { |
| 1663 InitializeBucket(temporary_table[i]); | 1663 InitializeBucket(temporary_table[i]); |
| 1664 } | 1664 } |
| 1665 } else { | 1665 } else { |
| 1666 Mover<ValueType, Allocator, | 1666 Mover<ValueType, Allocator, |
| 1667 Traits::template NeedsToForbidGCOnMove<>::value>:: | 1667 Traits::template NeedsToForbidGCOnMove<>::value>:: |
| 1668 Move(std::move(table_[i]), temporary_table[i]); | 1668 Move(std::move(table_[i]), temporary_table[i]); |
| 1669 table_[i].~ValueType(); |
| 1669 } | 1670 } |
| 1670 } | 1671 } |
| 1671 table_ = temporary_table; | 1672 table_ = temporary_table; |
| 1672 | 1673 |
| 1673 if (Traits::kEmptyValueIsZero) { | 1674 if (Traits::kEmptyValueIsZero) { |
| 1674 memset(original_table, 0, new_table_size * sizeof(ValueType)); | 1675 memset(original_table, 0, new_table_size * sizeof(ValueType)); |
| 1675 } else { | 1676 } else { |
| 1676 for (unsigned i = 0; i < new_table_size; i++) | 1677 for (unsigned i = 0; i < new_table_size; i++) |
| 1677 InitializeBucket(original_table[i]); | 1678 InitializeBucket(original_table[i]); |
| 1678 } | 1679 } |
| (...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2272 CollectionIterator end(to_be_removed.end()); | 2273 CollectionIterator end(to_be_removed.end()); |
| 2273 for (CollectionIterator it(to_be_removed.begin()); it != end; ++it) | 2274 for (CollectionIterator it(to_be_removed.begin()); it != end; ++it) |
| 2274 collection.erase(*it); | 2275 collection.erase(*it); |
| 2275 } | 2276 } |
| 2276 | 2277 |
| 2277 } // namespace WTF | 2278 } // namespace WTF |
| 2278 | 2279 |
| 2279 #include "wtf/HashIterators.h" | 2280 #include "wtf/HashIterators.h" |
| 2280 | 2281 |
| 2281 #endif // WTF_HashTable_h | 2282 #endif // WTF_HashTable_h |
| OLD | NEW |