Skip to content

Commit 97e526d

Browse files
committed
COMP: Fix dashboard warnings.
1 parent 023a6cf commit 97e526d

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

Hybrid/vtkMNIObjectReader.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ int vtkMNIObjectReader::ReadCells(vtkPolyData *data, vtkIdType numCells,
596596
for (vtkIdType i = 0; i < numCells; i++)
597597
{
598598
vtkIdType endIndex = endIndices->GetValue(i);
599-
vtkIdType numIndices = endIndex - lastEndIndex;
599+
numIndices = endIndex - lastEndIndex;
600600

601601
cellArray->InsertNextCell(numIndices);
602602

Hybrid/vtkMNIObjectWriter.cxx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,9 @@ int vtkMNIObjectWriter::WriteNormals(vtkPolyData *data)
373373
newNormals->SetNumberOfComponents(3);
374374
newNormals->SetNumberOfTuples(numPoints);
375375

376-
vtkIdType j = 0;
377-
for (j = 0; j < numPoints; j++)
376+
for (vtkIdType ii = 0; ii < numPoints; ii++)
378377
{
379-
float *normal = newNormals->GetPointer(3*j);
378+
float *normal = newNormals->GetPointer(3*ii);
380379
normal[0] = 0.0;
381380
normal[1] = 0.0;
382381
normal[2] = 0.0;
@@ -476,9 +475,9 @@ int vtkMNIObjectWriter::WriteNormals(vtkPolyData *data)
476475
}
477476

478477
// Normalize the normals
479-
for (j = 0; j < numPoints; j++)
478+
for (vtkIdType jj = 0; jj < numPoints; jj++)
480479
{
481-
float *normal = newNormals->GetPointer(3*j);
480+
float *normal = newNormals->GetPointer(3*jj);
482481
vtkMath::Normalize(normal);
483482
}
484483

@@ -536,13 +535,14 @@ int vtkMNIObjectWriter::WriteColors(vtkProperty *property, vtkPolyData *data)
536535
newScalars = vtkUnsignedCharArray::New();
537536
newScalars->SetNumberOfComponents(4);
538537
newScalars->SetNumberOfTuples(1);
539-
unsigned char *rgba = newScalars->GetPointer(0);
540538

541-
if (this->Property)
539+
unsigned char rgba[4];
540+
541+
if (property)
542542
{
543543
double color[3];
544-
this->Property->GetColor(color);
545-
double opacity = this->Property->GetOpacity();
544+
property->GetColor(color);
545+
double opacity = property->GetOpacity();
546546

547547
rgba[0] = static_cast<unsigned char>(color[0]*255);
548548
rgba[1] = static_cast<unsigned char>(color[1]*255);
@@ -557,6 +557,7 @@ int vtkMNIObjectWriter::WriteColors(vtkProperty *property, vtkPolyData *data)
557557
rgba[3] = 255;
558558
}
559559

560+
newScalars->SetTupleValue(0, rgba);
560561
scalars = newScalars;
561562
}
562563

Hybrid/vtkMNITransformWriter.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ int vtkMNITransformWriter::WriteThinPlateSplineTransform(
299299
for (i = 0; i < n; i++)
300300
{
301301
double *p = target->GetPoint(i);
302-
for (int k = 0; k < ndim; k++)
302+
for (k = 0; k < ndim; k++)
303303
{
304304
X[k][i] = p[k];
305305
}

0 commit comments

Comments
 (0)