From: Anthony Geay Date: Mon, 2 Mar 2020 11:29:01 +0000 (+0100) Subject: cartesian_algo.py nearly OK with container under valgrind X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=33b631f7dea10bcef6fd02995330f6755b0245d2;p=modules%2Fsmesh.git cartesian_algo.py nearly OK with container under valgrind --- diff --git a/src/SMDS/SMDS_UnstructuredGrid.cxx b/src/SMDS/SMDS_UnstructuredGrid.cxx index e06cf3ba2..059799f97 100644 --- a/src/SMDS/SMDS_UnstructuredGrid.cxx +++ b/src/SMDS/SMDS_UnstructuredGrid.cxx @@ -246,10 +246,11 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector& idNodesOldToNew, int n // --- create new compacted Connectivity, Locations and Types int newConnectivitySize = this->Connectivity->GetNumberOfConnectivityEntries(); + vtkIdTypeArray *tmp((vtkIdTypeArray *)(this->Connectivity->GetOffsetsArray())); 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 -= tmp->GetValue( i+1 ) - tmp->GetValue( i ); vtkCellArray *newConnectivity = vtkCellArray::New(); newConnectivity->Initialize();