Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix implicit conversion bug in C++11 #732

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/IVtkVTK/IVtkVTK_ShapeData.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ void IVtkVTK_ShapeData::InsertLine (const IVtk_IdType theShapeID,
const IVtk_PointId thePointId2,
const IVtk_MeshType theMeshType)
{
vtkIdType aPoints[2] = { thePointId1, thePointId2 };
vtkIdType aPoints[2] = { static_cast<vtkIdType>(thePointId1),
static_cast<vtkIdType>(thePointId2)};
myPolyData->InsertNextCell (VTK_LINE, 2, aPoints);
const vtkIdType aShapeIDVTK = theShapeID;
const vtkIdType aType = theMeshType;
Expand Down Expand Up @@ -165,7 +166,9 @@ void IVtkVTK_ShapeData::InsertTriangle (const IVtk_IdType theShapeID,
const IVtk_PointId thePointId3,
const IVtk_MeshType theMeshType)
{
vtkIdType aPoints[3] = { thePointId1, thePointId2, thePointId3 };
vtkIdType aPoints[3] = { static_cast<vtkIdType>(thePointId1),
static_cast<vtkIdType>(thePointId2),
static_cast<vtkIdType>(thePointId3)};
myPolyData->InsertNextCell (VTK_TRIANGLE, 3, aPoints);
const vtkIdType aShapeIDVTK = theShapeID;
const vtkIdType aType = theMeshType;
Expand Down