X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FSALOMEDS%2FSALOMEDS_AttributeSequenceOfReal_i.cxx;h=e07ed0b87282126ba570a02a82dce55eca7e50af;hb=8469d4f02c5b4379665d4ec1b07709d3c8411114;hp=f918b8e6d30ec3b27a601b057a310cbe9dc49354;hpb=9749fc1db72bd80e278405114b05ffc69b5031da;p=modules%2Fkernel.git diff --git a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal_i.cxx index f918b8e6d..e07ed0b87 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal_i.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -6,7 +6,7 @@ // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -32,11 +32,9 @@ void SALOMEDS_AttributeSequenceOfReal_i::Assign(const SALOMEDS::DoubleSeq& other { SALOMEDS::Locker lock; CheckLocked(); - std::vector CasCadeSeq; - for (int i = 0; i < other.length(); i++) { - CasCadeSeq.push_back(other[i]); - } - dynamic_cast(_impl)->Assign(CasCadeSeq); + std::vector aSeq; + for(int i = 0, len = other.length(); i(_impl)->Assign(aSeq); } SALOMEDS::DoubleSeq* SALOMEDS_AttributeSequenceOfReal_i::CorbaSequence() @@ -44,9 +42,9 @@ SALOMEDS::DoubleSeq* SALOMEDS_AttributeSequenceOfReal_i::CorbaSequence() SALOMEDS::Locker lock; SALOMEDS::DoubleSeq_var CorbaSeq = new SALOMEDS::DoubleSeq; const std::vector& CasCadeSeq = dynamic_cast(_impl)->Array(); - int len = CasCadeSeq.size(); + size_t len = CasCadeSeq.size(); CorbaSeq->length(len); - for (int i = 0; i < len; i++) { + for (size_t i = 0; i < len; i++) { CorbaSeq[i] = CasCadeSeq[i]; } return CorbaSeq._retn();