MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / copy

Method copy

physx/source/foundation/include/PsArray.h:647–665  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

645template <class T, class Alloc>
646template <class A>
647PX_NOINLINE void Array<T, Alloc>::copy(const Array<T, A>& other)
648{
649 if(!other.empty())
650 {
651 mData = allocate(mSize = mCapacity = other.size());
652 copy(mData, mData + mSize, other.begin());
653 }
654 else
655 {
656 mData = NULL;
657 mSize = 0;
658 mCapacity = 0;
659 }
660
661 // mData = allocate(other.mSize);
662 // mSize = other.mSize;
663 // mCapacity = other.mSize;
664 // copy(mData, mData + mSize, other.mData);
665}
666
667template <class T, class Alloc>
668PX_NOINLINE void Array<T, Alloc>::resizeUninitialized(const uint32_t size)

Callers 1

Calls 5

allocateFunction · 0.85
copyFunction · 0.85
emptyMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected