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

Method capacityIncrement

physx/source/foundation/include/PsArray.h:625–629  ·  view source on GitHub ↗

The idea here is to prevent accidental bugs with pushBack or insert. Unfortunately it interacts badly with InlineArrays with smaller inline allocations. TODO(dsequeira): policy template arg, this is exactly what they're for.

Source from the content-addressed store, hash-verified

623 // it interacts badly with InlineArrays with smaller inline allocations.
624 // TODO(dsequeira): policy template arg, this is exactly what they're for.
625 PX_INLINE uint32_t capacityIncrement() const
626 {
627 const uint32_t capacity = this->capacity();
628 return capacity == 0 ? 1 : capacity * 2;
629 }
630
631 T* mData;
632 uint32_t mSize;

Callers

nothing calls this directly

Calls 1

capacityMethod · 0.95

Tested by

no test coverage detected