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

Method InitializeCharacteristics

IO/Legacy/vtkDataReader.cxx:3447–3517  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

3445
3446//------------------------------------------------------------------------------
3447void vtkDataReader::InitializeCharacteristics()
3448{
3449 int i;
3450
3451 // Release any old stuff first
3452 if (this->ScalarsNameInFile)
3453 {
3454 for (i = 0; i < this->NumberOfScalarsInFile; i++)
3455 {
3456 delete[] this->ScalarsNameInFile[i];
3457 }
3458 this->NumberOfScalarsInFile = 0;
3459 delete[] this->ScalarsNameInFile;
3460 this->ScalarsNameInFile = nullptr;
3461 }
3462
3463 if (this->VectorsNameInFile)
3464 {
3465 for (i = 0; i < this->NumberOfVectorsInFile; i++)
3466 {
3467 delete[] this->VectorsNameInFile[i];
3468 }
3469 this->NumberOfVectorsInFile = 0;
3470 delete[] this->VectorsNameInFile;
3471 this->VectorsNameInFile = nullptr;
3472 }
3473
3474 if (this->TensorsNameInFile)
3475 {
3476 for (i = 0; i < this->NumberOfTensorsInFile; i++)
3477 {
3478 delete[] this->TensorsNameInFile[i];
3479 }
3480 this->NumberOfTensorsInFile = 0;
3481 delete[] this->TensorsNameInFile;
3482 this->TensorsNameInFile = nullptr;
3483 }
3484
3485 if (this->NormalsNameInFile)
3486 {
3487 for (i = 0; i < this->NumberOfNormalsInFile; i++)
3488 {
3489 delete[] this->NormalsNameInFile[i];
3490 }
3491 this->NumberOfNormalsInFile = 0;
3492 delete[] this->NormalsNameInFile;
3493 this->NormalsNameInFile = nullptr;
3494 }
3495
3496 if (this->TCoordsNameInFile)
3497 {
3498 for (i = 0; i < this->NumberOfTCoordsInFile; i++)
3499 {
3500 delete[] this->TCoordsNameInFile[i];
3501 }
3502 this->NumberOfTCoordsInFile = 0;
3503 delete[] this->TCoordsNameInFile;
3504 this->TCoordsNameInFile = nullptr;

Callers 2

~vtkDataReaderMethod · 0.95
CharacterizeFileMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected