summaryrefslogtreecommitdiff
path: root/svtools/source/config/extcolorcfg.cxx
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 /svtools/source/config/extcolorcfg.cxx
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 'svtools/source/config/extcolorcfg.cxx')
-rw-r--r--svtools/source/config/extcolorcfg.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/svtools/source/config/extcolorcfg.cxx b/svtools/source/config/extcolorcfg.cxx
index a8bb0b0d3243..6f360bf82aae 100644
--- a/svtools/source/config/extcolorcfg.cxx
+++ b/svtools/source/config/extcolorcfg.cxx
@@ -242,7 +242,7 @@ void ExtendedColorConfig_Impl::Load(const OUString& rScheme)
if ( aComponentDisplayNamesValue.getLength() && (aComponentDisplayNamesValue[0] >>= sComponentDisplayName) )
{
sal_Int32 nIndex = 0;
- m_aComponentDisplayNames.insert(TDisplayNames::value_type(componentName.getToken(1,'/',nIndex),sComponentDisplayName));
+ m_aComponentDisplayNames.emplace(componentName.getToken(1,'/',nIndex),sComponentDisplayName);
}
componentName += "/Entries";
@@ -261,7 +261,7 @@ void ExtendedColorConfig_Impl::Load(const OUString& rScheme)
sName = sName.copy(0,sName.lastIndexOf(sDisplayName));
OUString sCurrentDisplayName;
aDisplayNamesValue[j] >>= sCurrentDisplayName;
- aDisplayNameMap.insert(TDisplayNames::value_type(sName,sCurrentDisplayName));
+ aDisplayNameMap.emplace(sName,sCurrentDisplayName);
}
}
@@ -332,7 +332,7 @@ void ExtendedColorConfig_Impl::FillComponentColors(uno::Sequence < OUString >& _
OUString* pColorIter = aColorNames.getArray();
OUString* pColorEnd = pColorIter + aColorNames.getLength();
- m_aConfigValuesPos.push_back(m_aConfigValues.insert(TComponents::value_type(sComponentName,TComponentMapping(TConfigValues(),TMapPos()))).first);
+ m_aConfigValuesPos.push_back(m_aConfigValues.emplace(sComponentName,TComponentMapping(TConfigValues(),TMapPos())).first);
TConfigValues& aConfigValues = (*m_aConfigValuesPos.rbegin())->second.first;
TMapPos& aConfigValuesPos = (*m_aConfigValuesPos.rbegin())->second.second;
for(int i = 0; pColorIter != pColorEnd; ++pColorIter ,++i)
@@ -360,7 +360,7 @@ void ExtendedColorConfig_Impl::FillComponentColors(uno::Sequence < OUString >& _
else
nDefaultColor = nColor;
ExtendedColorConfigValue aValue(sName,sDisplayName,nColor,nDefaultColor);
- aConfigValuesPos.push_back(aConfigValues.insert(TConfigValues::value_type(sName,aValue)).first);
+ aConfigValuesPos.push_back(aConfigValues.emplace(sName,aValue).first);
}
} // for(int i = 0; pColorIter != pColorEnd; ++pColorIter ,++i)
}