summaryrefslogtreecommitdiff
path: root/unotools
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 /unotools
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 'unotools')
-rw-r--r--unotools/source/config/cmdoptions.cxx2
-rw-r--r--unotools/source/config/extendedsecurityoptions.cxx2
-rw-r--r--unotools/source/config/optionsdlg.cxx2
-rw-r--r--unotools/source/config/pathoptions.cxx4
4 files changed, 5 insertions, 5 deletions
diff --git a/unotools/source/config/cmdoptions.cxx b/unotools/source/config/cmdoptions.cxx
index f9be432a9a7a..5f1eac638403 100644
--- a/unotools/source/config/cmdoptions.cxx
+++ b/unotools/source/config/cmdoptions.cxx
@@ -74,7 +74,7 @@ class SvtCmdOptions
void AddCommand( const OUString& aCmd )
{
- m_aCommandHashMap.insert( CommandHashMap::value_type( aCmd, 0 ) );
+ m_aCommandHashMap.emplace( aCmd, 0 );
}
private:
diff --git a/unotools/source/config/extendedsecurityoptions.cxx b/unotools/source/config/extendedsecurityoptions.cxx
index 0d680c304d27..7a9630595189 100644
--- a/unotools/source/config/extendedsecurityoptions.cxx
+++ b/unotools/source/config/extendedsecurityoptions.cxx
@@ -211,7 +211,7 @@ void SvtExtendedSecurityOptions_Impl::FillExtensionHashMap( ExtensionHashMap& aH
// Don't use value if sequence has not the correct length
if ( aValues[0] >>= aValue )
// Add extension into secure extensions hash map
- aHashMap.insert( ExtensionHashMap::value_type( aValue.toAsciiLowerCase(), 1 ) );
+ aHashMap.emplace( aValue.toAsciiLowerCase(), 1 );
else
{
SAL_WARN( "unotools.config", "SvtExtendedSecurityOptions_Impl::FillExtensionHashMap(): not string value?" );
diff --git a/unotools/source/config/optionsdlg.cxx b/unotools/source/config/optionsdlg.cxx
index 471dad5a365e..7da3f2305455 100644
--- a/unotools/source/config/optionsdlg.cxx
+++ b/unotools/source/config/optionsdlg.cxx
@@ -144,7 +144,7 @@ void SvtOptionsDlgOptions_Impl::ReadNode( const OUString& _rNode, NodeType _eTyp
aValues = GetProperties( lResult );
bool bHide = false;
if ( aValues[0] >>= bHide )
- m_aOptionNodeList.insert( OptionNodeList::value_type( sNode, bHide ) );
+ m_aOptionNodeList.emplace( sNode, bHide );
if ( _eType != NT_Option )
{
diff --git a/unotools/source/config/pathoptions.cxx b/unotools/source/config/pathoptions.cxx
index d6675cd31333..c8925967c875 100644
--- a/unotools/source/config/pathoptions.cxx
+++ b/unotools/source/config/pathoptions.cxx
@@ -412,7 +412,7 @@ SvtPathOptions_Impl::SvtPathOptions_Impl() :
for ( sal_Int32 n = 0; n < aPathPropSeq.getLength(); n++ )
{
const css::beans::Property& aProperty = aPathPropSeq[n];
- aTempHashMap.insert( NameToHandleMap::value_type( aProperty.Name, aProperty.Handle ));
+ aTempHashMap.emplace(aProperty.Name, aProperty.Handle);
}
// Create mapping between internal enum (SvtPathOptions::Paths) and property handle
@@ -425,7 +425,7 @@ SvtPathOptions_Impl::SvtPathOptions_Impl() :
{
sal_Int32 nHandle = pIter->second;
sal_Int32 nEnum = p.ePath;
- m_aMapEnumToPropHandle.insert( EnumToHandleMap::value_type( nEnum, nHandle ));
+ m_aMapEnumToPropHandle.emplace( nEnum, nHandle );
}
}