summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-08-10 16:43:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-11 12:38:32 +0200
commitd347c2403605c5aa3ddd98fb605366914acab79f (patch)
treee39624030741234c514bccd858e69d6318dfba68 /l10ntools
parentf0e68d4feaaa43f7450432ad1ebd92c2b572400f (diff)
convert std::map::insert to std::map::emplace
which is considerably less verbose Change-Id: Ifa373e8eb09e39bd6c8d3578641610a6055a187b Reviewed-on: https://gerrit.libreoffice.org/40978 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/merge.cxx2
-rw-r--r--l10ntools/source/xmlparse.cxx16
2 files changed, 9 insertions, 9 deletions
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index eba518a8165d..35df82f37f30 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -113,7 +113,7 @@ OString MergeEntrys::GetQTZText(const ResData& rResData, const OString& rOrigTex
std::pair<MergeDataHashMap::iterator,bool> MergeDataHashMap::insert(const OString& rKey, MergeData* pMergeData)
{
- std::pair<iterator,bool> aTemp = m_aHashMap.insert(HashMap_t::value_type( rKey, pMergeData ));
+ std::pair<iterator,bool> aTemp = m_aHashMap.emplace( rKey, pMergeData );
if( m_aHashMap.size() == 1 )
{
// When first insert, set an iterator to the first element
diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index c8f670508f20..809aa62fd8a8 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -313,13 +313,13 @@ XMLFile::XMLFile( const OString &rFileName ) // the file name, empty if created
: XMLParentNode( nullptr )
, m_sFileName( rFileName )
{
- m_aNodes_localize.insert( TagMap::value_type(OString("bookmark") , true) );
- m_aNodes_localize.insert( TagMap::value_type(OString("variable") , true) );
- m_aNodes_localize.insert( TagMap::value_type(OString("paragraph") , true) );
- m_aNodes_localize.insert( TagMap::value_type(OString("alt") , true) );
- m_aNodes_localize.insert( TagMap::value_type(OString("caption") , true) );
- m_aNodes_localize.insert( TagMap::value_type(OString("title") , true) );
- m_aNodes_localize.insert( TagMap::value_type(OString("link") , true) );
+ m_aNodes_localize.emplace( OString("bookmark") , true );
+ m_aNodes_localize.emplace( OString("variable") , true );
+ m_aNodes_localize.emplace( OString("paragraph") , true );
+ m_aNodes_localize.emplace( OString("alt") , true );
+ m_aNodes_localize.emplace( OString("caption") , true );
+ m_aNodes_localize.emplace( OString("title") , true );
+ m_aNodes_localize.emplace( OString("link") , true );
}
void XMLFile::Extract()
@@ -364,7 +364,7 @@ void XMLFile::InsertL10NElement( XMLElement* pElement )
{
pElem = new LangHashMap;
(*pElem)[ sLanguage ]=pElement;
- m_pXMLStrings->insert( XMLHashMap::value_type( sId , pElem ) );
+ m_pXMLStrings->emplace( sId , pElem );
m_vOrder.push_back( sId );
}
else // Already there