diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-05 11:11:53 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-06 21:56:23 +0200 |
commit | e6f52edc3dda716fd4ab3bb83c0112ffd62ebef7 (patch) | |
tree | ec32b517bd966b1e84601fccfbf04918809cb5cf | |
parent | 692c4f4d2c5995660baf747f2d15929896f6e992 (diff) |
use more std::unique_ptr in ScUndoDraw
Change-Id: I4216efd74f279a0997754b75b62b2dedce09511e
Reviewed-on: https://gerrit.libreoffice.org/61434
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sc/source/ui/inc/undodraw.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/undo/undobase.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/inc/undodraw.hxx b/sc/source/ui/inc/undodraw.hxx index 20ec4799e8d3..0950d9d57821 100644 --- a/sc/source/ui/inc/undodraw.hxx +++ b/sc/source/ui/inc/undodraw.hxx @@ -37,7 +37,7 @@ public: ScUndoDraw( std::unique_ptr<SfxUndoAction> pUndo, ScDocShell* pDocSh ); virtual ~ScUndoDraw() override; - SfxUndoAction* ReleaseDrawUndo() { return pDrawUndo.release(); } + std::unique_ptr<SfxUndoAction> ReleaseDrawUndo() { return std::move(pDrawUndo); } virtual void Undo() override; virtual void Redo() override; diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx index af5d6fd22a6d..a138a097c48e 100644 --- a/sc/source/ui/undo/undobase.cxx +++ b/sc/source/ui/undo/undobase.cxx @@ -77,7 +77,7 @@ bool ScSimpleUndo::Merge( SfxUndoAction *pNextAction ) // ScUndoDraw is later deleted by the UndoManager ScUndoDraw* pCalcUndo = static_cast<ScUndoDraw*>(pNextAction); - pDetectiveUndo.reset( pCalcUndo->ReleaseDrawUndo() ); + pDetectiveUndo = pCalcUndo->ReleaseDrawUndo(); return true; } |