Commit 9924cce2 authored by Julien Finet's avatar Julien Finet
Browse files

Remove warnings when building in release mode

Some variables are solely used in assert calls that are only enabled in
Debug.

Change-Id: I0231786168687a10eaf1be53a1970b49a34cc76f
parent 709955c6
......@@ -164,7 +164,9 @@ vtkIdType vtkColorTransferControlPointsItem::AddPoint(double* newPos)
vtkIdType expectedPoint = this->vtkControlPointsItem::AddPoint(newPos);
double rgb[3] = {0., 0., 0.};
this->ColorTransferFunction->GetColor(newPos[0], rgb);
vtkIdType addedPoint = this->ColorTransferFunction->AddRGBPoint(newPos[0], rgb[0], rgb[1], rgb[2]);
vtkIdType addedPoint =
this->ColorTransferFunction->AddRGBPoint(newPos[0], rgb[0], rgb[1], rgb[2]);
vtkNotUsed(expectedPoint);
assert(addedPoint == expectedPoint);
return addedPoint;
}
......@@ -176,8 +178,11 @@ vtkIdType vtkColorTransferControlPointsItem::RemovePoint(double* currentPoint)
{
return -1;
}
vtkIdType expectedPoint = this->vtkControlPointsItem::RemovePoint(currentPoint);
vtkIdType removedPoint = this->ColorTransferFunction->RemovePoint(currentPoint[0]);
vtkIdType expectedPoint =
this->vtkControlPointsItem::RemovePoint(currentPoint);
vtkIdType removedPoint =
this->ColorTransferFunction->RemovePoint(currentPoint[0]);
vtkNotUsed(expectedPoint);
assert(removedPoint == expectedPoint);
return removedPoint;
}
......@@ -893,10 +893,11 @@ void vtkControlPointsItem::Stroke(const vtkVector2f& newPos)
}
}
}
int size = this->GetNumberOfPoints();
const int oldNumberOfPoints = this->GetNumberOfPoints();
vtkIdType addedPoint = this->AddPoint(pos);
this->SetCurrentPoint(addedPoint);
assert(size + 1 == this->GetNumberOfPoints());
vtkNotUsed(oldNumberOfPoints);
assert(oldNumberOfPoints + 1 == this->GetNumberOfPoints());
}
//-----------------------------------------------------------------------------
......
......@@ -152,8 +152,11 @@ vtkIdType vtkPiecewiseControlPointsItem::RemovePoint(double* currentPoint)
{
return -1;
}
vtkIdType expectedPoint = this->vtkControlPointsItem::RemovePoint(currentPoint);
vtkIdType removedPoint = this->PiecewiseFunction->RemovePoint(currentPoint[0]);
vtkIdType expectedPoint =
this->vtkControlPointsItem::RemovePoint(currentPoint);
vtkIdType removedPoint =
this->PiecewiseFunction->RemovePoint(currentPoint[0]);
vtkNotUsed(expectedPoint);
assert(removedPoint == expectedPoint);
return removedPoint;
}
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