From 727697ac0bd8e2647ac2e4de67eb81a94f0e242b Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 17 Oct 2016 10:15:18 +0300 Subject: [PATCH] Bug: GetIDs() method of AttributeParameter returns wrong list of ids for string, int array, real array, string array types. --- src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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 << " "; } -- 2.39.2