summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-04-12 14:17:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-04-13 09:28:44 +0200
commit639df4d76d545ca23021f69a9d738a9a92c148cd (patch)
tree87b20ea1518f6a878102a367c211cb6f93c554fd /sc
parent9dce6f74b1b43293b40217c1163c8d4285251e97 (diff)
use more std::make_unique
Change-Id: I7d85cbc9105c5e0c4a8d9a69c4ac9d6dfc07eabd Reviewed-on: https://gerrit.libreoffice.org/70663 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/bcaslot.cxx4
-rw-r--r--sc/source/ui/undo/undocell.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx
index b3af7fd0b5ed..5026d65de397 100644
--- a/sc/source/core/data/bcaslot.cxx
+++ b/sc/source/core/data/bcaslot.cxx
@@ -718,7 +718,7 @@ void ScBroadcastAreaSlotMachine::StartListeningArea(
{
TableSlotsMap::iterator iTab( aTableSlotsMap.find( nTab));
if (iTab == aTableSlotsMap.end())
- iTab = aTableSlotsMap.emplace(nTab, std::unique_ptr<TableSlots>(new TableSlots)).first;
+ iTab = aTableSlotsMap.emplace(nTab, std::make_unique<TableSlots>()).first;
ScBroadcastAreaSlot** ppSlots = (*iTab).second->getSlots();
SCSIZE nStart, nEnd, nRowBreak;
ComputeAreaPoints( rRange, nStart, nEnd, nRowBreak );
@@ -1029,7 +1029,7 @@ void ScBroadcastAreaSlotMachine::UpdateBroadcastAreas(
{
TableSlotsMap::iterator iTab( aTableSlotsMap.find( nTab));
if (iTab == aTableSlotsMap.end())
- iTab = aTableSlotsMap.emplace(nTab, std::unique_ptr<TableSlots>(new TableSlots)).first;
+ iTab = aTableSlotsMap.emplace(nTab, std::make_unique<TableSlots>()).first;
ScBroadcastAreaSlot** ppSlots = (*iTab).second->getSlots();
SCSIZE nStart, nEnd, nRowBreak;
ComputeAreaPoints( aRange, nStart, nEnd, nRowBreak );
diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx
index 2e41dbb40dc1..55e309c959df 100644
--- a/sc/source/ui/undo/undocell.cxx
+++ b/sc/source/ui/undo/undocell.cxx
@@ -990,7 +990,7 @@ void ScUndoRangeNames::DoChange( bool bUndo )
if ( bUndo )
{
- auto p = std::unique_ptr<ScRangeName>(new ScRangeName( *pOldRanges ));
+ auto p = std::make_unique<ScRangeName>(*pOldRanges);
if (mnTab >= 0)
rDoc.SetRangeName( mnTab, std::move(p) );
else
@@ -998,7 +998,7 @@ void ScUndoRangeNames::DoChange( bool bUndo )
}
else
{
- auto p = std::unique_ptr<ScRangeName>(new ScRangeName( *pNewRanges ));
+ auto p = std::make_unique<ScRangeName>(*pNewRanges);
if (mnTab >= 0)
rDoc.SetRangeName( mnTab, std::move(p) );
else