------------------------------------------------------------------------------ Description: If size>InternalTupleCapacity, allocate enough memory. \pre positive_size: size>0
| 468 | // If size>InternalTupleCapacity, allocate enough memory. |
| 469 | // \pre positive_size: size>0 |
| 470 | void 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 | } |
| 490 | VTK_ABI_NAMESPACE_END |
no test coverage detected