Salome HOME
Fix 32bits config bug
[tools/medcoupling.git] / src / MEDCoupling / MEDCouplingDefinitionTime.cxx
index 489db08948d07c0c8a7fde5fba8f055f3277a554..d75b63cf41f96f4fa05d4ac72bf54c18181eb2e7 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2020  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -53,9 +53,9 @@ MEDCouplingDefinitionTimeSlice *MEDCouplingDefinitionTimeSlice::New(const MEDCou
         return new MEDCouplingDefinitionTimeSliceLT(f,meshId,arrId[0],arrId[1],fieldId);
       }
     case NO_TIME:
-      throw INTERP_KERNEL::Exception("Invalide time discretization ! NO_TIME ! Impossible to build a definition time slice !");
+      throw INTERP_KERNEL::Exception("Invalid time discretization ! NO_TIME ! Impossible to build a definition time slice !");
     default:
-      throw INTERP_KERNEL::Exception("Invalide time discretization : Not recognized !");
+      throw INTERP_KERNEL::Exception("Invalid time discretization : Not recognized !");
   }
 }
 
@@ -446,11 +446,11 @@ MEDCouplingDefinitionTime::MEDCouplingDefinitionTime(const std::vector<const MED
   if(sz!=arrRefs.size())
     throw INTERP_KERNEL::Exception("MEDCouplingDefinitionTime constructor : internal error ! should never happen !");
   _slices.resize(sz);
-  for(std::size_t i=0;i<sz;i++)
+  for(int i=0;i<ToIdType(sz);i++)
     {
       if(arrRefs.empty())
         throw INTERP_KERNEL::Exception("MEDCouplingDefinitionTime constructor : A field is null in list impossible to build a time definition !");
-      _slices[i]=MEDCouplingDefinitionTimeSlice::New(fs[i],meshRefs[i],arrRefs[i],(int)i);
+      _slices[i]=MEDCouplingDefinitionTimeSlice::New(fs[i],meshRefs[i],arrRefs[i],i);
     }
   if(sz<=1)
     return ;