From: vsr Date: Mon, 17 Oct 2016 07:15:18 +0000 (+0300) Subject: Bug: GetIDs() method of AttributeParameter returns wrong list of ids for string,... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FV7_8_BR;p=modules%2Fkernel.git Bug: GetIDs() method of AttributeParameter returns wrong list of ids for string, int array, real array, string array types. --- diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx index b2e10d93f..04d410953 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx @@ -526,7 +526,7 @@ std::vector SALOMEDSImpl_AttributeParameter::GetIDs(const Parameter case PT_STRING: { if(_strings.size()) { anArray.resize(_strings.size()); - for(std::map::const_iterator p = _strings.begin(); p!= _strings.end(); p++) + for(std::map::const_iterator p = _strings.begin(); p!= _strings.end(); p++, i++) anArray[i] = p->first; } break; @@ -534,7 +534,7 @@ std::vector SALOMEDSImpl_AttributeParameter::GetIDs(const Parameter case PT_REALARRAY: { if(_realarrays.size()) { anArray.resize(_realarrays.size()); - for(std::map< std::string, std::vector >::const_iterator p = _realarrays.begin(); p!= _realarrays.end(); p++) + for(std::map< std::string, std::vector >::const_iterator p = _realarrays.begin(); p!= _realarrays.end(); p++, i++) anArray[i] = p->first; } break; @@ -542,7 +542,7 @@ std::vector SALOMEDSImpl_AttributeParameter::GetIDs(const Parameter case PT_INTARRAY: { if(_intarrays.size()) { anArray.resize(_intarrays.size()); - for(std::map< std::string, std::vector >::const_iterator p = _intarrays.begin(); p!= _intarrays.end(); p++) + for(std::map< std::string, std::vector >::const_iterator p = _intarrays.begin(); p!= _intarrays.end(); p++, i++) anArray[i] = p->first; } break; @@ -550,7 +550,7 @@ std::vector SALOMEDSImpl_AttributeParameter::GetIDs(const Parameter case PT_STRARRAY: { if(_strarrays.size()) { anArray.resize(_strarrays.size()); - for(std::map< std::string, std::vector >::const_iterator p = _strarrays.begin(); p!= _strarrays.end(); p++) + for(std::map< std::string, std::vector >::const_iterator p = _strarrays.begin(); p!= _strarrays.end(); p++, i++) anArray[i] = p->first; } break; @@ -631,7 +631,6 @@ std::string SALOMEDSImpl_AttributeParameter::Save() char *tmpBuffer = new char[255]; buffer << _ints.size() << " "; - for(std::map::const_iterator p = _ints.begin(); p != _ints.end(); p++) { buffer << convertString(p->first) << " " << p->second << " "; }