summaryrefslogtreecommitdiff
path: root/sc/source/core/data/dpobject.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-23 08:20:34 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-24 08:38:02 +0200
commit87c06415cebd707ae359cb2f1b06d468cb6afb08 (patch)
tree2732c68fcc98c03f6fecddc59000e9e25b067c2d /sc/source/core/data/dpobject.cxx
parentf31c9f16fefd16ea434cdd68721d45bced9b78e1 (diff)
clang-tidy performance-unnecessary-copy-init in sc
Change-Id: I93ded61c22bd533a6ffaddd20d6e527f176e7651 Reviewed-on: https://gerrit.libreoffice.org/62218 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/core/data/dpobject.cxx')
-rw-r--r--sc/source/core/data/dpobject.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index a891b0938259..e20678dd998b 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -828,8 +828,7 @@ void ScDPObject::ReloadGroupTableData()
if (pData)
{
// Replace the existing group table data with the source data.
- shared_ptr<ScDPTableData> pSource = pData->GetSourceTableData();
- mpTableData = pSource;
+ mpTableData = pData->GetSourceTableData();
}
return;
}
@@ -839,7 +838,7 @@ void ScDPObject::ReloadGroupTableData()
{
// This is already a group table data. Salvage the source data and
// re-create a new group data.
- shared_ptr<ScDPTableData> pSource = pData->GetSourceTableData();
+ const shared_ptr<ScDPTableData>& pSource = pData->GetSourceTableData();
shared_ptr<ScDPGroupTableData> pGroupData(new ScDPGroupTableData(pSource, pDoc));
pDimData->WriteToData(*pGroupData);
mpTableData = pGroupData;