From: eap Date: Mon, 2 Mar 2020 15:23:17 +0000 (+0300) Subject: Porting to ParaView 5.8: fix SMDS_UnstructuredGrid::compactGrid() X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=550311af7b1d59413fde01030516434170ecaf6c;p=modules%2Fsmesh.git Porting to ParaView 5.8: fix SMDS_UnstructuredGrid::compactGrid() --- diff --git a/src/SMDS/SMDS_UnstructuredGrid.cxx b/src/SMDS/SMDS_UnstructuredGrid.cxx index e06cf3ba2..d73ccbaf5 100644 --- a/src/SMDS/SMDS_UnstructuredGrid.cxx +++ b/src/SMDS/SMDS_UnstructuredGrid.cxx @@ -249,7 +249,7 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector& idNodesOldToNew, int n if ( newCellSize != oldCellSize ) for ( int i = 0; i < oldCellSize - 1; ++i ) if ( this->Types->GetValue( i ) == VTK_EMPTY_CELL ) - newConnectivitySize -= this->CellLocations->GetValue( i+1 ) - this->CellLocations->GetValue( i ); + newConnectivitySize -= this->Connectivity->GetCellSize( i ); vtkCellArray *newConnectivity = vtkCellArray::New(); newConnectivity->Initialize(); @@ -982,7 +982,7 @@ void SMDS_UnstructuredGrid::ModifyCellNodes(int vtkVolId, std::map loc vtkIdType const *tmp(nullptr); // will refer to the point id's of the face vtkIdType *pts; // will refer to the point id's of the face this->GetCellPoints(vtkVolId, npts, tmp); - std::copy(tmp, tmp+npts, pts); + pts = const_cast< vtkIdType*>( tmp ); for (int i = 0; i < npts; i++) { if (localClonedNodeIds.count(pts[i]))