summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-08-11 11:36:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-11 13:51:29 +0200
commitdb17a874af37350b3270932175854ee674447bc1 (patch)
treefecc983fb75d3a4072cc7bd344fc824d548deb0d /chart2
parentdd8a400bbbb1b8d5592a870f2036a4df3d005a7d (diff)
convert std::map::insert to std::map::emplace II
Change-Id: Ief8bd59c903625ba65b75114b7b52c3b7ecbd331 Reviewed-on: https://gerrit.libreoffice.org/41019 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/dialogs/DialogModel.cxx11
-rw-r--r--chart2/source/tools/InternalDataProvider.cxx5
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx3
3 files changed, 7 insertions, 12 deletions
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx
index f361a432ee64..a84fc811b30b 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -216,18 +216,15 @@ struct lcl_RolesWithRangeAppend : public
Reference< beans::XPropertySet > xProp( xSeq, uno::UNO_QUERY_THROW );
if( xProp->getPropertyValue( "Role" ) >>= aRole )
{
- m_rDestCnt->insert(
- tContainerType::value_type(
- aRole, xSeq->getSourceRangeRepresentation()));
+ m_rDestCnt->emplace(aRole, xSeq->getSourceRangeRepresentation());
// label
if( aRole == m_aRoleForLabelSeq )
{
Reference< data::XDataSequence > xLabelSeq( xVal->getLabel());
if( xLabelSeq.is())
{
- m_rDestCnt->insert(
- tContainerType::value_type(
- lcl_aLabelRole, xLabelSeq->getSourceRangeRepresentation()));
+ m_rDestCnt->emplace(
+ lcl_aLabelRole, xLabelSeq->getSourceRangeRepresentation());
}
}
}
@@ -471,7 +468,7 @@ void addMissingRoles(DialogModel::tRolesWithRanges& rResult, const uno::Sequence
for(sal_Int32 i = 0, n = rRoles.getLength(); i < n; ++i)
{
if(rResult.find(rRoles[i]) == rResult.end())
- rResult.insert(DialogModel::tRolesWithRanges::value_type(rRoles[i], OUString()));
+ rResult.emplace(rRoles[i], OUString());
}
}
diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx
index 2888ece39dba..e1a629f04e68 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -415,10 +415,9 @@ void InternalDataProvider::addDataSequenceToMap(
const OUString & rRangeRepresentation,
const Reference< chart2::data::XDataSequence > & xSequence )
{
- m_aSequenceMap.insert(
- tSequenceMap::value_type(
+ m_aSequenceMap.emplace(
rRangeRepresentation,
- uno::WeakReference< chart2::data::XDataSequence >( xSequence )));
+ uno::WeakReference< chart2::data::XDataSequence >( xSequence ));
}
void InternalDataProvider::deleteMapReferences( const OUString & rRangeRepresentation )
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 160fbd7f194d..ba3ac187a80c 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -1785,8 +1785,7 @@ private:
TotalStoreType::iterator itr = aStore.find(fX);
if (itr == aStore.end())
// New min-max pair for give X value.
- aStore.insert(
- TotalStoreType::value_type(fX, std::pair<double,double>(fYMin,fYMax)));
+ aStore.emplace(fX, std::pair<double,double>(fYMin,fYMax));
else
{
MinMaxType& r = itr->second;