X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_MeshEditPreview.cxx;h=878819bf6165765e0f23e711e1a8c49a54ec0044;hp=1e58474dd93ed98e358e0eb7b2d1997553020944;hb=e85e13ee2a8e2484050471ff8e4dea298abe481a;hpb=c5f8cda9bf008812f728073dd5cc04f6c5082bbb diff --git a/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx b/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx index 1e58474dd..878819bf6 100644 --- a/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -167,10 +167,10 @@ vtkIdType getCellType( const SMDSAbs_ElementType theType, */ //================================================================================ -void SMESHGUI_MeshEditPreview::SetData (const SMESH::MeshPreviewStruct_var previewData) +void SMESHGUI_MeshEditPreview::SetData (const SMESH::MeshPreviewStruct& previewData) { // Create points - const SMESH::nodes_array& aNodesXYZ = previewData->nodesXYZ; + const SMESH::nodes_array& aNodesXYZ = previewData.nodesXYZ; vtkPoints* aPoints = vtkPoints::New(); aPoints->SetNumberOfPoints(aNodesXYZ.length()); @@ -182,8 +182,8 @@ void SMESHGUI_MeshEditPreview::SetData (const SMESH::MeshPreviewStruct_var previ aPoints->Delete(); // Create cells - const SMESH::long_array& anElemConnectivity = previewData->elementConnectivities; - const SMESH::types_array& anElemTypes = previewData->elementTypes; + const SMESH::long_array& anElemConnectivity = previewData.elementConnectivities; + const SMESH::types_array& anElemTypes = previewData.elementTypes; vtkIdType aCellsSize = anElemConnectivity.length() + anElemTypes.length(); vtkIdType aNbCells = anElemTypes.length(); @@ -222,7 +222,8 @@ void SMESHGUI_MeshEditPreview::SetData (const SMESH::MeshPreviewStruct_var previ aCellLocationsArray->SetNumberOfTuples( aNbCells ); aConnectivity->InitTraversal(); - for( vtkIdType idType = 0, *pts, npts; aConnectivity->GetNextCell( npts, pts ); idType++ ) + vtkIdType const *pts(nullptr); + for( vtkIdType idType = 0, npts; aConnectivity->GetNextCell( npts, pts ); idType++ ) aCellLocationsArray->SetValue( idType, aConnectivity->GetTraversalLocation( npts ) ); myGrid->SetCells( aCellTypesArray, aCellLocationsArray, aConnectivity );