X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FMEDCouplingTimeDiscretization.txx;h=09be2e6327559ce5ea2b8bbfb3bf73972c7b3a2f;hb=90b7c9c73054965b8085ab0ecd2646a3d59f475a;hp=54a0b19f0f072e8e1d1e310cde2df1e79d28144c;hpb=00d3f3fe11658d5daf0b87d36253ddd75dd212c8;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling/MEDCouplingTimeDiscretization.txx b/src/MEDCoupling/MEDCouplingTimeDiscretization.txx index 54a0b19f0..09be2e632 100644 --- a/src/MEDCoupling/MEDCouplingTimeDiscretization.txx +++ b/src/MEDCoupling/MEDCouplingTimeDiscretization.txx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 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 @@ -148,8 +148,8 @@ namespace MEDCoupling return true; if(_array==0 || other->_array==0) return false; - int nbC1(_array->getNumberOfComponents()),nbC2(other->_array->getNumberOfComponents()); - int nbMin(std::min(nbC1,nbC2)); + std::size_t nbC1(_array->getNumberOfComponents()),nbC2(other->_array->getNumberOfComponents()); + std::size_t nbMin(std::min(nbC1,nbC2)); if(nbC1!=nbC2 && nbMin!=1) return false; return true; @@ -164,7 +164,7 @@ namespace MEDCoupling return true; if(_array==0 || other->_array==0) return false; - int nbC1(_array->getNumberOfComponents()),nbC2(other->_array->getNumberOfComponents()); + std::size_t nbC1(_array->getNumberOfComponents()),nbC2(other->_array->getNumberOfComponents()); if(nbC1!=nbC2 && nbC2!=1) return false; return true; @@ -225,12 +225,12 @@ namespace MEDCoupling } template - void MEDCouplingTimeDiscretizationTemplate::getTinySerializationIntInformation(std::vector& tinyInfo) const + void MEDCouplingTimeDiscretizationTemplate::getTinySerializationIntInformation(std::vector& tinyInfo) const { if(_array) { tinyInfo.push_back(_array->getNumberOfTuples()); - tinyInfo.push_back(_array->getNumberOfComponents()); + tinyInfo.push_back(ToIdType(_array->getNumberOfComponents())); } else { @@ -248,13 +248,13 @@ namespace MEDCoupling template void MEDCouplingTimeDiscretizationTemplate::getTinySerializationStrInformation(std::vector& tinyInfo) const { - int nbOfCompo(_array->getNumberOfComponents()); - for(int i=0;igetNumberOfComponents()); + for(std::size_t i=0;igetInfoOnComponent(i)); } template - void MEDCouplingTimeDiscretizationTemplate::resizeForUnserialization(const std::vector& tinyInfoI, std::vector::ArrayType *>& arrays) + void MEDCouplingTimeDiscretizationTemplate::resizeForUnserialization(const std::vector& tinyInfoI, std::vector::ArrayType *>& arrays) { arrays.resize(1); if(_array!=0) @@ -270,7 +270,7 @@ namespace MEDCoupling } template - void MEDCouplingTimeDiscretizationTemplate::checkForUnserialization(const std::vector& tinyInfoI, const std::vector::ArrayType *>& arrays) + void MEDCouplingTimeDiscretizationTemplate::checkForUnserialization(const std::vector& tinyInfoI, const std::vector::ArrayType *>& arrays) { static const char MSG[]="MEDCouplingTimeDiscretization::checkForUnserialization : arrays in input is expected to have size one !"; if(arrays.size()!=1) @@ -289,11 +289,11 @@ namespace MEDCoupling } template - void MEDCouplingTimeDiscretizationTemplate::finishUnserialization(const std::vector& tinyInfoI, const std::vector& tinyInfoD, const std::vector& tinyInfoS) + void MEDCouplingTimeDiscretizationTemplate::finishUnserialization(const std::vector& tinyInfoI, const std::vector& tinyInfoD, const std::vector& tinyInfoS) { _time_tolerance=tinyInfoD[0]; - int nbOfCompo=_array->getNumberOfComponents(); - for(int i=0;igetNumberOfComponents(); + for(std::size_t i=0;isetInfoOnComponent(i,tinyInfoS[i]); }