From 6b841d5026f3fbb6f8e76dddd66e82d1a2a3a6cd Mon Sep 17 00:00:00 2001
From: Ken Moreland <kmorel@sandia.gov>
Date: Thu, 12 Nov 2009 08:55:40 -0500
Subject: [PATCH] STYLE: Set array components then tuples to ensure that the
 respective values are set properly and that the array gets allocated only
 once.

---
 Infovis/vtkStringToNumeric.cxx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Infovis/vtkStringToNumeric.cxx b/Infovis/vtkStringToNumeric.cxx
index 3553980a659..8c02bd17854 100644
--- a/Infovis/vtkStringToNumeric.cxx
+++ b/Infovis/vtkStringToNumeric.cxx
@@ -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
-- 
GitLab