| 611 | template <class Entry, class Key, class HashFn, class GetKey, class Allocator, bool compacting> |
| 612 | template <typename HK, typename GK, class A, bool comp> |
| 613 | PX_NOINLINE void |
| 614 | HashBase<Entry, Key, HashFn, GetKey, Allocator, compacting>::copy(const HashBase<Entry, Key, HK, GK, A, comp>& other) |
| 615 | { |
| 616 | reserve(other.mEntriesCount); |
| 617 | |
| 618 | for(uint32_t i = 0; i < other.mEntriesCount; i++) |
| 619 | { |
| 620 | for(uint32_t j = other.mHash[i]; j != EOL; j = other.mEntriesNext[j]) |
| 621 | { |
| 622 | const Entry& otherEntry = other.mEntries[j]; |
| 623 | |
| 624 | bool exists; |
| 625 | Entry* newEntry = create(GK()(otherEntry), exists); |
| 626 | NV_CLOTH_ASSERT(!exists); |
| 627 | |
| 628 | PX_PLACEMENT_NEW(newEntry, Entry)(otherEntry); |
| 629 | } |
| 630 | } |
| 631 | } |
| 632 | |
| 633 | template <class Key, class HashFn, class Allocator = typename AllocatorTraits<Key>::Type, bool Coalesced = false> |
| 634 | class HashSetBase |