summaryrefslogtreecommitdiff
path: root/l10ntools/source/xmlparse.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'l10ntools/source/xmlparse.cxx')
-rw-r--r--l10ntools/source/xmlparse.cxx15
1 files changed, 7 insertions, 8 deletions
diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index 3ba61be5e1a0..297b736dae22 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -301,10 +301,9 @@ XMLFile::~XMLFile()
{
if( m_pXMLStrings )
{
- XMLHashMap::iterator pos = m_pXMLStrings->begin();
- for( ; pos != m_pXMLStrings->end() ; ++pos )
+ for (auto const& pos : *m_pXMLStrings)
{
- delete pos->second; // Check and delete content also ?
+ delete pos.second; // Check and delete content also ?
}
}
}
@@ -404,15 +403,15 @@ XMLFile& XMLFile::operator=(const XMLFile& rObj)
if( rObj.m_pXMLStrings )
{
m_pXMLStrings.reset( new XMLHashMap );
- for( XMLHashMap::iterator pos = rObj.m_pXMLStrings->begin() ; pos != rObj.m_pXMLStrings->end() ; ++pos )
+ for (auto const& pos : *rObj.m_pXMLStrings)
{
- LangHashMap* pElem=pos->second;
+ LangHashMap* pElem=pos.second;
LangHashMap* pNewelem = new LangHashMap;
- for(LangHashMap::iterator pos2=pElem->begin(); pos2!=pElem->end();++pos2)
+ for (auto const& pos2 : *pElem)
{
- (*pNewelem)[ pos2->first ] = new XMLElement( *pos2->second );
+ (*pNewelem)[ pos2.first ] = new XMLElement( *pos2.second );
}
- (*m_pXMLStrings)[ pos->first ] = pNewelem;
+ (*m_pXMLStrings)[ pos.first ] = pNewelem;
}
}
}