diff options
Diffstat (limited to 'comphelper/source/property/MasterPropertySetInfo.cxx')
-rw-r--r-- | comphelper/source/property/MasterPropertySetInfo.cxx | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/comphelper/source/property/MasterPropertySetInfo.cxx b/comphelper/source/property/MasterPropertySetInfo.cxx index ef7fbd42f483..9fe965e3b9bc 100644 --- a/comphelper/source/property/MasterPropertySetInfo.cxx +++ b/comphelper/source/property/MasterPropertySetInfo.cxx @@ -46,27 +46,21 @@ MasterPropertySetInfo::MasterPropertySetInfo( PropertyInfo const * pMap ) MasterPropertySetInfo::~MasterPropertySetInfo() throw() { - PropertyDataHash::iterator aEnd = maMap.end(), aIter = maMap.begin(); - while (aIter != aEnd ) - { - delete (*aIter).second; - ++aIter; - } + for( auto& rObj : maMap ) + delete rObj.second; } void MasterPropertySetInfo::add( PropertyInfoHash &rHash, sal_uInt8 nMapId ) { if( maProperties.getLength() ) maProperties.realloc( 0 ); - PropertyInfoHash::iterator aIter = rHash.begin(), aEnd = rHash.end(); - while ( aIter != aEnd ) + for( const auto& rObj : rHash ) { SAL_WARN_IF( - maMap.find(aIter->first) != maMap.end(), - "comphelper", "Duplicate property name \"" << aIter->first << "\""); - maMap[(*aIter).first] = new PropertyData ( nMapId, (*aIter).second ); - ++aIter; + maMap.find(rObj.first) != maMap.end(), + "comphelper", "Duplicate property name \"" << rObj.first << "\""); + maMap[rObj.first] = new PropertyData ( nMapId, rObj.second ); } } |