------------------------------------------------------------------------------
| 112 | |
| 113 | //------------------------------------------------------------------------------ |
| 114 | void vtkIdList::SetArray(vtkIdType* array, vtkIdType size, bool save) |
| 115 | { |
| 116 | if (this->ManageMemory) |
| 117 | { |
| 118 | delete[] this->Ids; |
| 119 | } |
| 120 | if (!array) |
| 121 | { |
| 122 | if (size) |
| 123 | { |
| 124 | vtkWarningMacro(<< "Passed a nullptr with a non-zero size... Setting size to 0."); |
| 125 | size = 0; |
| 126 | } |
| 127 | if (!save) |
| 128 | { |
| 129 | vtkWarningMacro(<< "Passed a nullptr while setting save to false... Setting save to true."); |
| 130 | save = true; |
| 131 | } |
| 132 | } |
| 133 | this->ManageMemory = save; |
| 134 | this->Ids = array; |
| 135 | this->NumberOfIds = size; |
| 136 | this->Size = size; |
| 137 | } |
| 138 | |
| 139 | //------------------------------------------------------------------------------ |
| 140 | void vtkIdList::DeleteId(vtkIdType vtkid) |
no outgoing calls