diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-12 17:01:48 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-13 08:41:43 +0200 |
commit | 0673411c58529e6c4252b7973a16afae1f4363f1 (patch) | |
tree | 659fa0b206ddd6522ac9a1229fef108663408a9b | |
parent | 72a86870670ae3af7503a5c034282e5eaeaf4582 (diff) |
loplugin:useuniqueptr in SwUndoSplitNode
Change-Id: Ib77b31a7558b5d3c928d774d3c6bdaeff26c177d
Reviewed-on: https://gerrit.libreoffice.org/57366
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sw/source/core/inc/UndoSplitMove.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/undo/unspnd.cxx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/inc/UndoSplitMove.hxx b/sw/source/core/inc/UndoSplitMove.hxx index d4a86dea4cbc..08e59657c4d4 100644 --- a/sw/source/core/inc/UndoSplitMove.hxx +++ b/sw/source/core/inc/UndoSplitMove.hxx @@ -25,7 +25,7 @@ class SwUndoSplitNode: public SwUndo { std::unique_ptr<SwHistory> m_pHistory; - SwRedlineData* pRedlData; + std::unique_ptr<SwRedlineData> pRedlData; sal_uLong nNode; sal_Int32 nContent; bool bTableFlag : 1; diff --git a/sw/source/core/undo/unspnd.cxx b/sw/source/core/undo/unspnd.cxx index 2253c3df5124..27d73ebd8ee7 100644 --- a/sw/source/core/undo/unspnd.cxx +++ b/sw/source/core/undo/unspnd.cxx @@ -56,7 +56,7 @@ SwUndoSplitNode::SwUndoSplitNode( SwDoc* pDoc, const SwPosition& rPos, // consider Redline if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() ) { - pRedlData = new SwRedlineData( nsRedlineType_t::REDLINE_INSERT, pDoc->getIDocumentRedlineAccess().GetRedlineAuthor() ); + pRedlData.reset( new SwRedlineData( nsRedlineType_t::REDLINE_INSERT, pDoc->getIDocumentRedlineAccess().GetRedlineAuthor() ) ); SetRedlineFlags( pDoc->getIDocumentRedlineAccess().GetRedlineFlags() ); } @@ -66,7 +66,7 @@ SwUndoSplitNode::SwUndoSplitNode( SwDoc* pDoc, const SwPosition& rPos, SwUndoSplitNode::~SwUndoSplitNode() { m_pHistory.reset(); - delete pRedlData; + pRedlData.reset(); } void SwUndoSplitNode::UndoImpl(::sw::UndoRedoContext & rContext) |