Skip to content
Snippets Groups Projects
Commit 6b841d50 authored by Kenneth Moreland's avatar Kenneth Moreland
Browse files

STYLE: Set array components then tuples to ensure that the respective values...

STYLE: Set array components then tuples to ensure that the respective values are set properly and that the array gets allocated only once.
parent fdc5371d
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,7 @@
#include "vtkUnicodeStringArray.h"
#include "vtkVariant.h"
vtkCxxRevisionMacro(vtkStringToNumeric, "1.6");
vtkCxxRevisionMacro(vtkStringToNumeric, "1.7");
vtkStandardNewMacro(vtkStringToNumeric);
vtkStringToNumeric::vtkStringToNumeric()
......@@ -125,14 +125,14 @@ void vtkStringToNumeric::ConvertArrays(vtkFieldData* fieldData)
// Set up the output array
vtkDoubleArray* doubleArray = vtkDoubleArray::New();
doubleArray->SetNumberOfValues(numComps*numTuples);
doubleArray->SetNumberOfComponents(numComps);
doubleArray->SetNumberOfTuples(numTuples);
doubleArray->SetName(arrayName);
// Set up the output array
vtkIntArray* intArray = vtkIntArray::New();
intArray->SetNumberOfValues(numComps*numTuples);
intArray->SetNumberOfComponents(numComps);
intArray->SetNumberOfTuples(numTuples);
intArray->SetName(arrayName);
// Convert the strings to time point values
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment