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 /sc/source/ui/dbgui/pvfundlg.cxx | |
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 'sc/source/ui/dbgui/pvfundlg.cxx')
-rw-r--r-- | sc/source/ui/dbgui/pvfundlg.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx index d0e68d7eb950..ecd99a44dd6a 100644 --- a/sc/source/ui/dbgui/pvfundlg.cxx +++ b/sc/source/ui/dbgui/pvfundlg.cxx @@ -403,7 +403,7 @@ IMPL_LINK( ScDPFunctionDlg, SelectHdl, ListBox&, rLBox, void ) NameMapType aMap; vector<ScDPLabelData::Member>::const_iterator itr = rMembers.begin(), itrEnd = rMembers.end(); for (; itr != itrEnd; ++itr) - aMap.insert(NameMapType::value_type(itr->getDisplayName(), itr->maName)); + aMap.emplace(itr->getDisplayName(), itr->maName); maBaseItemNameMap.swap(aMap); } @@ -661,7 +661,7 @@ void ScDPSubtotalOptDlg::Init( const ScDPNameVec& rDataFields, bool bEnableLayou for( ScDPNameVec::const_iterator aIt = rDataFields.begin(), aEnd = rDataFields.end(); aIt != aEnd; ++aIt ) { // Cache names for later lookup. - maDataFieldNameMap.insert(NameMapType::value_type(aIt->maLayoutName, *aIt)); + maDataFieldNameMap.emplace(aIt->maLayoutName, *aIt); m_pLbSortBy->InsertEntry( aIt->maLayoutName ); m_pLbShowUsing->InsertEntry( aIt->maLayoutName ); // for AutoShow @@ -840,7 +840,7 @@ ScDPShowDetailDlg::ScDPShowDetailDlg( vcl::Window* pParent, ScDPObject& rDPObj, aName = *pLayoutName; } mpLbDims->InsertEntry( aName ); - maNameIndexMap.insert(DimNameIndexMap::value_type(aName, nDim)); + maNameIndexMap.emplace(aName, nDim); } } } |