Salome HOME
Make it run with int64 configuration with non regression tests V9_5_0a1
authorAnthony Geay <anthony.geay@edf.fr>
Mon, 24 Feb 2020 08:51:14 +0000 (09:51 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Mon, 24 Feb 2020 08:51:14 +0000 (09:51 +0100)
src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx

index 5a044ad97ec078dbc163953b766051b574aedf64..3a67b54025ad74b7a1cd07bd0c319fecfbfbe20c 100644 (file)
@@ -168,11 +168,11 @@ vtkIdTypeArray *ELGACmp::createNew(const MEDCoupling::MEDFileFieldGlobsReal *glo
     }
   //
   vtkIdType ncell(ds->GetNumberOfCells());
-  int *pt(new int[ncell]),offset(0);
+  vtkIdType *pt(new vtkIdType[ncell]),offset(0);
   for(vtkIdType cellId=0;cellId<ncell;cellId++)
     {
       vtkCell *cell(ds->GetCell(cellId));
-      int delta(m[(unsigned char)cell->GetCellType()]);
+      vtkIdType delta(m[(unsigned char)cell->GetCellType()]);
       pt[cellId]=offset;
       offset+=delta;
     }
@@ -312,12 +312,12 @@ void AssignToFieldData(DataArray *vPtr, const MEDTimeReq *tr, vtkFieldData *att,
       vtkIdTypeArray *elno(vtkIdTypeArray::New());
       elno->SetNumberOfComponents(1);
       vtkIdType ncell(ds->GetNumberOfCells());
-      int *pt(new int[ncell]),offset(0);
+      vtkIdType *pt(new vtkIdType[ncell]),offset(0);
       std::set<int> cellTypes;
       for(vtkIdType cellId=0;cellId<ncell;cellId++)
         {
           vtkCell *cell(ds->GetCell(cellId));
-          int delta(cell->GetNumberOfPoints());
+          vtkIdType delta(cell->GetNumberOfPoints());
           cellTypes.insert(cell->GetCellType());
           pt[cellId]=offset;
           offset+=delta;