summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdmodel.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-04 15:11:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-05 12:06:26 +0200
commit42b629bc7f700d6f1d1b922e5c6aab119b8edf27 (patch)
treeb860545d390a89d989554c89a148eef4c20990d8 /svx/source/svdraw/svdmodel.cxx
parent1fefdd6f3b4165491af433a815e6c82aa5ac8204 (diff)
use more std::unique_ptr in FmFormView::createControlLabelPair
Change-Id: I36f364739e5a37f9adc0fbad8a49a71947b7318b Reviewed-on: https://gerrit.libreoffice.org/61399 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/svdraw/svdmodel.cxx')
-rw-r--r--svx/source/svdraw/svdmodel.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 405ef170ab23..2c1576d4988a 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -348,9 +348,9 @@ void SdrModel::Undo()
pDo->Undo();
if(!pRedoStack)
pRedoStack.reset(new std::deque<std::unique_ptr<SfxUndoAction>>);
- SfxUndoAction* p = pUndoStack->front().release();
+ std::unique_ptr<SfxUndoAction> p = std::move(pUndoStack->front());
pUndoStack->pop_front();
- pRedoStack->emplace_front(p);
+ pRedoStack->emplace_front(std::move(p));
mbUndoEnabled = bWasUndoEnabled;
}
}
@@ -372,9 +372,9 @@ void SdrModel::Redo()
pDo->Redo();
if(!pUndoStack)
pUndoStack.reset(new std::deque<std::unique_ptr<SfxUndoAction>>);
- SfxUndoAction* p = pRedoStack->front().release();
+ std::unique_ptr<SfxUndoAction> p = std::move(pRedoStack->front());
pRedoStack->pop_front();
- pUndoStack->emplace_front(p);
+ pUndoStack->emplace_front(std::move(p));
mbUndoEnabled = bWasUndoEnabled;
}
}
@@ -514,8 +514,7 @@ void SdrModel::EndUndo()
{
if(pCurrentUndoGroup->GetActionCount()!=0)
{
- SdrUndoAction* pUndo=pCurrentUndoGroup.release();
- ImpPostUndoAction(std::unique_ptr<SdrUndoAction>(pUndo));
+ ImpPostUndoAction(std::move(pCurrentUndoGroup));
}
else
{