MCPcopy Create free account
hub / github.com/Kitware/VTK / AllocateInternalTuple

Method AllocateInternalTuple

Testing/GenericBridge/vtkBridgeAttribute.cxx:470–489  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Description: If size>InternalTupleCapacity, allocate enough memory. \pre positive_size: size>0

Source from the content-addressed store, hash-verified

468// If size>InternalTupleCapacity, allocate enough memory.
469// \pre positive_size: size>0
470void vtkBridgeAttribute::AllocateInternalTuple(int size)
471{
472 // size=this->GetNumberOfComponents()
473 assert("pre: positive_size" && size > 0);
474
475 if (this->InternalTuple == nullptr)
476 {
477 this->InternalTupleCapacity = size;
478 this->InternalTuple = new double[this->InternalTupleCapacity];
479 }
480 else
481 {
482 if (InternalTupleCapacity < size)
483 {
484 this->InternalTupleCapacity = size;
485 delete[] this->InternalTuple;
486 this->InternalTuple = new double[this->InternalTupleCapacity];
487 }
488 }
489}
490VTK_ABI_NAMESPACE_END

Callers 5

GetTupleMethod · 0.95
DeepCopyMethod · 0.95
ShallowCopyMethod · 0.95
InitWithPointDataMethod · 0.95
InitWithCellDataMethod · 0.95

Calls 1

assertFunction · 0.50

Tested by

no test coverage detected