diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-10 16:43:55 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-11 12:38:32 +0200 |
commit | d347c2403605c5aa3ddd98fb605366914acab79f (patch) | |
tree | e39624030741234c514bccd858e69d6318dfba68 /basctl | |
parent | f0e68d4feaaa43f7450432ad1ebd92c2b572400f (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 'basctl')
-rw-r--r-- | basctl/source/basicide/bastypes.cxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/macrodlg.cxx | 2 | ||||
-rw-r--r-- | basctl/source/dlged/dlged.cxx | 2 | ||||
-rw-r--r-- | basctl/source/dlged/dlgedobj.cxx | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index 91515535a257..8e29d0223ff6 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -657,7 +657,7 @@ void LibInfo::InsertInfo ( { Key aKey(rDocument, rLibName); m_aMap.erase(aKey); - m_aMap.insert(Map::value_type(aKey, Item(rCurrentName, eCurrentType))); + m_aMap.emplace(aKey, Item(rCurrentName, eCurrentType)); } void LibInfo::RemoveInfoFor (ScriptDocument const& rDocument) diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx index 0b02ee3b903c..6b9aad86f5cc 100644 --- a/basctl/source/basicide/macrodlg.cxx +++ b/basctl/source/basicide/macrodlg.cxx @@ -515,7 +515,7 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox, void ) DBG_ASSERT( pMethod, "Method not found! (NULL)" ); sal_uInt16 nStart, nEnd; pMethod->GetLineRange( nStart, nEnd ); - aMacros.insert( map< sal_uInt16, SbMethod*>::value_type( nStart, pMethod ) ); + aMacros.emplace( nStart, pMethod ); } m_pMacroBox->SetUpdateMode(false); diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx index ff888c6dab5e..3f904c96a991 100644 --- a/basctl/source/dlged/dlged.cxx +++ b/basctl/source/dlged/dlged.cxx @@ -382,7 +382,7 @@ void DlgEditor::SetDialog( const uno::Reference< container::XNameContainer >& xU xPSet->getPropertyValue( DLGED_PROP_TABINDEX ) >>= nTabIndex; // insert into map - aIndexToNameMap.insert( IndexToNameMap::value_type( nTabIndex, aName ) ); + aIndexToNameMap.emplace( nTabIndex, aName ); } // create controls and insert them into drawing page diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx index bead2801ebe8..21f88e3bc335 100644 --- a/basctl/source/dlged/dlgedobj.cxx +++ b/basctl/source/dlged/dlgedobj.cxx @@ -562,7 +562,7 @@ void DlgEdObj::TabIndexChange( const beans::PropertyChangeEvent& evt ) xPSet->getPropertyValue( DLGED_PROP_TABINDEX ) >>= nTabIndex; // insert into map - aIndexToNameMap.insert( IndexToNameMap::value_type( nTabIndex, aName ) ); + aIndexToNameMap.emplace( nTabIndex, aName ); } // create a helper list of control names, sorted by tab index @@ -1424,7 +1424,7 @@ void DlgEdForm::UpdateTabIndices() xPSet->getPropertyValue( DLGED_PROP_TABINDEX ) >>= nTabIndex; // insert into map - aIndexToNameMap.insert( IndexToNameMap::value_type( nTabIndex, aName ) ); + aIndexToNameMap.emplace( nTabIndex, aName ); } // set new tab indices |