-// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
ptIds.push_back( nodes[ iN++ ]->GetVtkID() );
}
- int vtkID = getGrid()->InsertNextLinkedCell(VTK_POLYHEDRON, nbFaces, &ptIds[0]);
+ vtkIdType vtkID = getGrid()->InsertNextLinkedCell(VTK_POLYHEDRON, nbFaces, &ptIds[0]);
setVtkID( vtkID );
}
return false;
vtkIdType nFaces = 0;
- vtkIdType* ptIds = 0;
- getGrid()->GetFaceStream( GetVtkID(), nFaces, ptIds );
+ vtkIdType const *tmp(nullptr);
+ getGrid()->GetFaceStream( GetVtkID(), nFaces, tmp );
+ vtkIdType *ptIds = const_cast<vtkIdType*>( tmp );
// stream size and nb faces should not change
- if ((int) quantities.size() != nFaces )
+ if ((vtkIdType) quantities.size() != nFaces )
{
return false;
}
- int id = 0, nbPoints = 0;
+ size_t id = 0, nbPoints = 0;
for ( int i = 0; i < nFaces; i++ )
{
int nodesInFace = ptIds[id];
nbPoints += nodesInFace;
id += (nodesInFace + 1);
}
- if ((int) nodes.size() != nbPoints )
+ if ( nodes.size() != nbPoints )
{
return false;
}
return SMDS_MeshCell::GetNode( ind );
vtkIdType nFaces = 0;
- vtkIdType* ptIds = 0;
+ vtkIdType const *ptIds(nullptr);
getGrid()->GetFaceStream( GetVtkID(), nFaces, ptIds );
int id = 0, nbPoints = 0;
for (int i = 0; i < nFaces; i++)
return SMDS_MeshCell::NbNodes();
vtkIdType nFaces = 0;
- vtkIdType* ptIds = 0;
+ vtkIdType const *ptIds(nullptr);
getGrid()->GetFaceStream( GetVtkID(), nFaces, ptIds );
int id = 0, nbPoints = 0;
for (int i = 0; i < nFaces; i++)
return SMDS_MeshCell::NbFaces();
vtkIdType nFaces = 0;
- vtkIdType* ptIds = 0;
+ vtkIdType const *ptIds(nullptr);
getGrid()->GetFaceStream( GetVtkID(), nFaces, ptIds );
return nFaces;
return SMDS_MeshCell::NbEdges();
vtkIdType nFaces = 0;
- vtkIdType* ptIds = 0;
+ vtkIdType const *ptIds(nullptr);
getGrid()->GetFaceStream( GetVtkID(), nFaces, ptIds );
int id = 0, nbEdges = 0;
for (int i = 0; i < nFaces; i++)
return SMDS_MeshCell::GetNodeIndex( node );
vtkIdType nFaces = 0;
- vtkIdType* ptIds = 0;
+ vtkIdType const *ptIds(nullptr);
getGrid()->GetFaceStream( GetVtkID(), nFaces, ptIds );
int id = 0;
for (int iF = 0; iF < nFaces; iF++)
}
return -1;
}
-bool SMDS_MeshVolume::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
+bool SMDS_MeshVolume::ChangeNodes(const SMDS_MeshNode* /*nodes*/[], const int /*nbNodes*/)
{
return false;
}
return SMDS_VolumeTool( this ).NbFaceNodes( face_ind-1 );
vtkIdType nFaces = 0;
- vtkIdType* ptIds = 0;
+ vtkIdType const *ptIds(nullptr);
getGrid()->GetFaceStream( GetVtkID(), nFaces, ptIds );
int id = 0, nbNodes = 0;
for (int i = 0; i < nFaces; i++)
return SMDS_VolumeTool( this ).GetFaceNodes( face_ind-1 )[ node_ind - 1 ];
vtkIdType nFaces = 0;
- vtkIdType* ptIds = 0;
+ vtkIdType const *ptIds(nullptr);
getGrid()->GetFaceStream( GetVtkID(), nFaces, ptIds);
int id = 0;
for (int i = 0; i < nFaces; i++)
if ( IsPoly() )
{
vtkIdType nFaces = 0;
- vtkIdType* ptIds = 0;
+ vtkIdType const *ptIds(nullptr);
getGrid()->GetFaceStream( GetVtkID(), nFaces, ptIds );
int id = 0;
for (int i = 0; i < nFaces; i++)