------------------------------------------------------------------------------
| 125 | |
| 126 | //------------------------------------------------------------------------------ |
| 127 | vtkTypeBool vtkVariantArray::Allocate(vtkIdType sz, vtkIdType) |
| 128 | { |
| 129 | if (sz > this->Size) |
| 130 | { |
| 131 | if (this->DeleteFunction) |
| 132 | { |
| 133 | this->DeleteFunction(this->Array); |
| 134 | } |
| 135 | |
| 136 | this->Size = (sz > 0 ? sz : 1); |
| 137 | this->Array = new ValueType[this->Size]; |
| 138 | if (!this->Array) |
| 139 | { |
| 140 | return 0; |
| 141 | } |
| 142 | this->DeleteFunction = DefaultDeleteFunction; |
| 143 | } |
| 144 | |
| 145 | this->MaxId = -1; |
| 146 | this->DataChanged(); |
| 147 | |
| 148 | return 1; |
| 149 | } |
| 150 | |
| 151 | //------------------------------------------------------------------------------ |
| 152 | void vtkVariantArray::Initialize() |
nothing calls this directly
no test coverage detected