------------------------------------------------------------------------------
| 1302 | |
| 1303 | //------------------------------------------------------------------------------ |
| 1304 | bool vtkCellArray::ConvertToSmallestStorage() |
| 1305 | { |
| 1306 | bool isHomogeneous = this->IsHomogeneous() >= 0; |
| 1307 | if (!isHomogeneous) |
| 1308 | { |
| 1309 | if (this->IsStorage64Bit() && this->CanConvertTo32BitStorage()) |
| 1310 | { |
| 1311 | return this->ConvertTo32BitStorage(); |
| 1312 | } |
| 1313 | // Already at the smallest possible. |
| 1314 | return true; |
| 1315 | } |
| 1316 | else |
| 1317 | { |
| 1318 | if (this->IsStorage64Bit() || this->IsStorageFixedSize64Bit()) |
| 1319 | { |
| 1320 | if (this->CanConvertTo32BitStorage()) // Avoid checking for homogeneity again |
| 1321 | { |
| 1322 | return this->ConvertToFixedSize32BitStorage(); |
| 1323 | } |
| 1324 | return this->ConvertToFixedSize64BitStorage(); |
| 1325 | } |
| 1326 | else if (this->IsStorage32Bit()) |
| 1327 | { |
| 1328 | return this->ConvertToFixedSize32BitStorage(); |
| 1329 | } |
| 1330 | // Already at the smallest possible. |
| 1331 | return true; |
| 1332 | } |
| 1333 | } |
| 1334 | |
| 1335 | //------------------------------------------------------------------------------ |
| 1336 | bool vtkCellArray::AllocateExact(vtkIdType numCells, vtkIdType connectivitySize) |
nothing calls this directly
no test coverage detected