Salome HOME
#19765 EDF 21730 - long time to load med file file with huge amount of groups
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_Measurements.cxx
index 852bca21e0a7d6e0906e37175b9f44af87a6cde0..a2373378e2f40088b76213abf6d48e9a3b4c0ff2 100644 (file)
@@ -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
@@ -361,7 +361,8 @@ void SMESHGUI_MinDistance::createPreview( double x1, double y1, double z1, doubl
   aCellLocationsArray->SetNumberOfComponents( 1 );
   aCellLocationsArray->SetNumberOfTuples( 1 );
   aCells->InitTraversal();
-  for( vtkIdType idType = 0, *pts, npts; aCells->GetNextCell( npts, pts ); idType++ )
+  vtkIdType const *pts(nullptr);
+  for( vtkIdType idType = 0, npts; aCells->GetNextCell( npts, pts ); idType++ )
     aCellLocationsArray->SetValue( idType, aCells->GetTraversalLocation( npts ) );
   aGrid->SetCells( aCellTypesArray, aCellLocationsArray, aCells );
   aCellLocationsArray->Delete();
@@ -894,7 +895,8 @@ void SMESHGUI_BoundingBox::createPreview( double minX, double maxX, double minY,
   aCellLocationsArray->SetNumberOfComponents( 1 );
   aCellLocationsArray->SetNumberOfTuples( 12 );
   aCells->InitTraversal();
-  for( vtkIdType idType = 0, *pts, npts; aCells->GetNextCell( npts, pts ); idType++ )
+  vtkIdType const *pts(nullptr);
+  for( vtkIdType idType = 0, npts; aCells->GetNextCell( npts, pts ); idType++ )
     aCellLocationsArray->SetValue( idType, aCells->GetTraversalLocation( npts ) );
   aGrid->SetCells( aCellTypesArray, aCellLocationsArray, aCells );
   aCellLocationsArray->Delete();