diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-21 20:21:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-22 07:43:22 +0100 |
commit | 968b64d054eb164cee9fb92b6bf7dd93f478bf24 (patch) | |
tree | 80d92181e4796cf77b37b1faa03a3ccf106aef22 /l10ntools | |
parent | 1d21a51d814b39711cb1cc7f925b0c620b42eaa7 (diff) |
loplugin:flatten in l10ntools..lotuswordpro
Change-Id: Ie6de142db1987094fdf538148ac5ee33379a3e4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127275
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/source/xmlparse.cxx | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx index d533d8db07ba..10f52fdcb3d7 100644 --- a/l10ntools/source/xmlparse.cxx +++ b/l10ntools/source/xmlparse.cxx @@ -394,28 +394,28 @@ XMLFile::XMLFile( const XMLFile& rObj ) XMLFile& XMLFile::operator=(const XMLFile& rObj) { - if( this != &rObj ) - { - XMLParentNode::operator=(rObj); + if( this == &rObj ) + return *this; - m_aNodes_localize = rObj.m_aNodes_localize; - m_vOrder = rObj.m_vOrder; + XMLParentNode::operator=(rObj); - m_pXMLStrings.reset(); + m_aNodes_localize = rObj.m_aNodes_localize; + m_vOrder = rObj.m_vOrder; - if( rObj.m_pXMLStrings ) + m_pXMLStrings.reset(); + + if( rObj.m_pXMLStrings ) + { + m_pXMLStrings.reset( new XMLHashMap ); + for (auto const& pos : *rObj.m_pXMLStrings) { - m_pXMLStrings.reset( new XMLHashMap ); - for (auto const& pos : *rObj.m_pXMLStrings) + LangHashMap* pElem=pos.second; + LangHashMap* pNewelem = new LangHashMap; + for (auto const& pos2 : *pElem) { - LangHashMap* pElem=pos.second; - LangHashMap* pNewelem = new LangHashMap; - for (auto const& pos2 : *pElem) - { - (*pNewelem)[ pos2.first ] = new XMLElement( *pos2.second ); - } - (*m_pXMLStrings)[ pos.first ] = pNewelem; + (*pNewelem)[ pos2.first ] = new XMLElement( *pos2.second ); } + (*m_pXMLStrings)[ pos.first ] = pNewelem; } } return *this; |