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

Method recreate

physx/source/foundation/include/PsArray.h:698–710  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

696
697template <class T, class Alloc>
698PX_NOINLINE void Array<T, Alloc>::recreate(uint32_t capacity)
699{
700 T* newData = allocate(capacity);
701 PX_ASSERT((!capacity) || (newData && (newData != mData)));
702
703 copy(newData, newData + mSize, mData);
704 destroy(mData, mData + mSize);
705 if(!isInUserMemory())
706 deallocate(mData);
707
708 mData = newData;
709 mCapacity = capacity;
710}
711
712template <class T, class Alloc>
713PX_INLINE void swap(Array<T, Alloc>& x, Array<T, Alloc>& y)

Callers

nothing calls this directly

Calls 5

allocateFunction · 0.85
copyFunction · 0.85
destroyFunction · 0.85
isInUserMemoryFunction · 0.85
deallocateFunction · 0.85

Tested by

no test coverage detected