Commit 13ee5b90 authored by Sean McBride's avatar Sean McBride

Add parens for less ambiguity, fix cppcheck warning

Change-Id: I2d81fe807e22d50913a57fa63c934deadc8e0787
parent 2f2c9e3c
......@@ -55,7 +55,7 @@ int TestAxes(int , char * [])
vtkAxis *axis = axesVertical[i].GetPointer();
axis->SetPoint1(vtkVector2f(i * 69 + 30, 10));
axis->SetPoint2(vtkVector2f(i * 69 + 30, 290));
axis->SetPosition(i % 2 ? vtkAxis::LEFT : vtkAxis::RIGHT);
axis->SetPosition((i % 2) ? vtkAxis::LEFT : vtkAxis::RIGHT);
axis->SetRange(NULL); // check that NULL pointers don't cause trouble
axis->SetRange(-1, 50);
......@@ -93,7 +93,7 @@ int TestAxes(int , char * [])
vtkAxis *axis = axesHorizontal[i].GetPointer();
axis->SetPoint1(vtkVector2f(310, i * 50 + 30));
axis->SetPoint2(vtkVector2f(490, i * 50 + 30));
axis->SetPosition(i % 2 ? vtkAxis::TOP : vtkAxis::BOTTOM);
axis->SetPosition((i % 2) ? vtkAxis::TOP : vtkAxis::BOTTOM);
axis->SetRange(-1, 50);
view->GetScene()->AddItem(axis);
......
......@@ -52,7 +52,7 @@ bool TestDataObjectTreeIterator()
{
vtkNew<vtkUniformGrid> child;
blocks[parent]->SetBlock(
block, block % 2 ? NULL : child.GetPointer());
block, (block % 2) ? NULL : child.GetPointer());
blocks[parent]->GetMetaData(block)->Set(
vtkCompositeDataSet::NAME(), blockName.c_str());
++numLeaves;
......
......@@ -323,7 +323,7 @@ void vtkQuadraticPolygon::GetPermutationFromPolygon(vtkIdType nb,
permutation->SetNumberOfIds(nb);
for (vtkIdType i = 0; i < nb; i++)
{
permutation->SetId(i, (i % 2 ? (i + nb)/2 : i/2));
permutation->SetId(i, ((i % 2) ? (i + nb)/2 : i/2));
}
}
......
......@@ -716,7 +716,7 @@ void vtkMultiThreshold::UpdateDependents(
}
}
}
decision = cnt % 2 ? INCLUDE : EXCLUDE;
decision = (cnt % 2) ? INCLUDE : EXCLUDE;
}
break;
case NAND:
......
......@@ -92,7 +92,7 @@ int TestCompositePolyDataMapper2(int argc, char* argv[])
cyl->Update();
child->DeepCopy(cyl->GetOutput(0));
blocks[parent]->SetBlock(
block, block % 2 ? NULL : child.GetPointer());
block, (block % 2) ? NULL : child.GetPointer());
blocks[parent]->GetMetaData(block)->Set(
vtkCompositeDataSet::NAME(), blockName.c_str());
// test not setting it on some
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment