Salome HOME
Make SMESH_creating_meshes_ex07 test OK
authorAnthony Geay <anthony.geay@edf.fr>
Mon, 2 Mar 2020 09:43:36 +0000 (10:43 +0100)
committervsr <vsr@opencascade.com>
Mon, 2 Mar 2020 10:58:45 +0000 (13:58 +0300)
src/SMDS/SMDS_MeshCell.cxx

index fc9f740316d7d15436a35326d111e42bfc86cbe8..3628aafe31ec31303989b396e010b60793db9668 100644 (file)
@@ -490,10 +490,10 @@ void SMDS_MeshCell::init( SMDSAbs_EntityType            theEntity,
 bool SMDS_MeshCell::ChangeNodes(const SMDS_MeshNode* nodes[], const int theNbNodes)
 {
   vtkIdType npts = 0;
-  vtkIdType *pts;
+  vtkIdType *pts(nullptr);
   vtkIdType const *tmp(nullptr);
   getGrid()->GetCellPoints( GetVtkID(), npts, tmp );
-  std::copy(tmp,tmp+npts,pts);
+  pts = const_cast<vtkIdType *>(tmp);
   if ( theNbNodes != npts )
   {
     MESSAGE("ChangeNodes problem: not the same number of nodes " << npts << " -> " << theNbNodes);