MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / copy

Method copy

Source/ThirdParty/NvCloth/ps/PsHashInternals.h:613–631  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

611template <class Entry, class Key, class HashFn, class GetKey, class Allocator, bool compacting>
612template <typename HK, typename GK, class A, bool comp>
613PX_NOINLINE void
614HashBase<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
633template <class Key, class HashFn, class Allocator = typename AllocatorTraits<Key>::Type, bool Coalesced = false>
634class HashSetBase

Callers

nothing calls this directly

Calls 2

reserveFunction · 0.85
createFunction · 0.85

Tested by

no test coverage detected