Salome HOME
bos #20256: [CEA 18523] Porting SMESH to int 64 bits
[modules/smesh.git] / src / SMDS / SMDS_VtkCellIterator.cxx
index 5c6aec32ddb1b2dbaea01f0ee1be646bd175a011..d9a553891c5d304babb2cf10db8e49e4127e8bf6 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2010-2019  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2021  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 
 _GetVtkNodes::_GetVtkNodes( TVtkIdList&        vtkIds,
                             SMDS_Mesh*         mesh,
-                            int                vtkCellId,
+                            vtkIdType          vtkCellId,
                             SMDSAbs_EntityType type )
 {
   vtkUnstructuredGrid*         grid = mesh->GetGrid();
   const std::vector<int>& interlace = SMDS_MeshCell::fromVtkOrder( type );
-  vtkIdType npts, *pts;
+  vtkIdType npts;
+  vtkIdType const *pts(nullptr);
   grid->GetCellPoints( vtkCellId, npts, pts );
   vtkIds.resize( npts );
   if ( interlace.empty() )
@@ -46,11 +47,12 @@ _GetVtkNodes::_GetVtkNodes( TVtkIdList&        vtkIds,
 
 _GetVtkNodesToUNV::_GetVtkNodesToUNV( TVtkIdList&        vtkIds,
                                       SMDS_Mesh*         mesh,
-                                      int                vtkCellId,
+                                      vtkIdType          vtkCellId,
                                       SMDSAbs_EntityType type )
 {
   vtkUnstructuredGrid* grid = mesh->GetGrid();
-  vtkIdType npts, *pts;
+  vtkIdType npts;
+  vtkIdType const *pts(nullptr);
   grid->GetCellPoints( vtkCellId, npts, pts );
   const int *ids = 0;
   switch ( type )
@@ -131,7 +133,7 @@ _GetVtkNodesToUNV::_GetVtkNodesToUNV( TVtkIdList&        vtkIds,
 
 _GetVtkNodesPolyh::_GetVtkNodesPolyh( TVtkIdList&        vtkIds,
                                       SMDS_Mesh*         mesh,
-                                      int                vtkCellId,
+                                      vtkIdType          vtkCellId,
                                       SMDSAbs_EntityType type )
 {
   vtkUnstructuredGrid* grid = mesh->GetGrid();
@@ -140,7 +142,7 @@ _GetVtkNodesPolyh::_GetVtkNodesPolyh( TVtkIdList&        vtkIds,
   case SMDSEntity_Polyhedra:
   {
     vtkIdType nFaces = 0;
-    vtkIdType* ptIds = 0;
+    vtkIdType const *ptIds(nullptr);
     grid->GetFaceStream( vtkCellId, nFaces, ptIds );
     int id = 0, nbNodesInFaces = 0;
     for ( int i = 0; i < nFaces; i++ )