summaryrefslogtreecommitdiff
path: root/cui
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 /cui
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 'cui')
-rw-r--r--cui/source/customize/cfg.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 9da485738c59..5618aef7e764 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -801,7 +801,7 @@ SvxEntries* ContextMenuSaveInData::GetEntries()
if ( xPopupMenu.is() )
{
// insert into std::unordered_map to filter duplicates from the parent
- aMenuInfo.insert( MenuInfo::value_type( aUrl, true ) );
+ aMenuInfo.emplace( aUrl, true );
OUString aUIMenuName = GetUIName( aUrl );
if ( aUIMenuName.isEmpty() )
@@ -2364,7 +2364,7 @@ SvxEntries* ToolbarSaveInData::GetEntries()
// insert into std::unordered_map to filter duplicates from the parent
- aToolbarInfo.insert( ToolbarInfo::value_type( systemname, true ));
+ aToolbarInfo.emplace( systemname, true );
OUString custom(CUSTOM_TOOLBAR_STR);
if ( systemname.startsWith( custom ) )
@@ -2426,7 +2426,7 @@ SvxEntries* ToolbarSaveInData::GetEntries()
ToolbarInfo::const_iterator pIter = aToolbarInfo.find( systemname );
if ( pIter == aToolbarInfo.end() )
{
- aToolbarInfo.insert( ToolbarInfo::value_type( systemname, true ));
+ aToolbarInfo.emplace( systemname, true );
try
{
@@ -2983,7 +2983,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( vcl::Window *pWindow,
{
names = m_xImportedImageManager->getAllImageNames( SvxConfigPageHelper::GetImageType() );
for ( sal_Int32 n = 0; n < names.getLength(); ++n )
- aImageInfo1.insert( ImageInfo::value_type( names[n], false ));
+ aImageInfo1.emplace( names[n], false );
}
sal_uInt16 nId = 1;
ImageInfo::const_iterator pConstIter = aImageInfo1.begin();
@@ -3013,7 +3013,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( vcl::Window *pWindow,
{
names = m_xParentImageManager->getAllImageNames( SvxConfigPageHelper::GetImageType() );
for ( sal_Int32 n = 0; n < names.getLength(); ++n )
- aImageInfo.insert( ImageInfo::value_type( names[n], false ));
+ aImageInfo.emplace( names[n], false );
}
names = m_xImageManager->getAllImageNames( SvxConfigPageHelper::GetImageType() );
@@ -3023,7 +3023,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( vcl::Window *pWindow,
if ( pIter != aImageInfo.end() )
pIter->second = true;
else
- aImageInfo.insert( ImageInfo::value_type( names[n], true ));
+ aImageInfo.emplace( names[n], true );
}
// large growth factor, expecting many entries