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

Function Resize

physx/samples/samplebase/wavefront.cpp:647–657  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

645
646 template<typename T>
647 void Resize(T*& data, unsigned& capacity, unsigned count, unsigned new_count)
648 {
649 if (new_count >= capacity)
650 {
651 capacity = new_count*2;
652 T* tmp = new T[capacity];
653 memcpy(tmp, data, count*sizeof(T));
654 delete[] data;
655 data = tmp;
656 }
657 }
658
659 int OBJ::ParseLine(int lineno,int argc,const char **argv) // return TRUE to continue parsing, return FALSE to abort parsing process
660 {

Callers 5

ParseLineMethod · 0.85
GetIndexMethod · 0.85
NodeTriangleMethod · 0.85
AddDataMethod · 0.85
CheckResizeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected