[Libreoffice-commits] core.git: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Sep 14 06:58:41 UTC 2018
sw/source/core/doc/DocumentContentOperationsManager.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit e1beb569ff54c2b9dde6dd442c6ea1cc53a03222
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Sep 13 10:43:25 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Sep 14 08:58:15 2018 +0200
loplugin:useuniqueptr in DocumentContentOperationsManager::MoveNodeRange
Change-Id: I2e32dba4ad9770ed62dbf74769ee00c05235bd40
Reviewed-on: https://gerrit.libreoffice.org/60445
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 52e67c6d0146..ed75cefaabc7 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -2249,9 +2249,9 @@ bool DocumentContentOperationsManager::MoveNodeRange( SwNodeRange& rRange, SwNod
// Set it to before the Position, so that it cannot be moved further.
SwNodeIndex aIdx( rPos, -1 );
- SwNodeIndex* pSaveInsPos = nullptr;
+ std::unique_ptr<SwNodeIndex> pSaveInsPos;
if( pUndo )
- pSaveInsPos = new SwNodeIndex( rRange.aStart, -1 );
+ pSaveInsPos.reset(new SwNodeIndex( rRange.aStart, -1 ));
// move the Nodes
bool bNoDelFrames = bool(SwMoveFlags::NO_DELFRMS & eMvFlags);
@@ -2302,7 +2302,7 @@ bool DocumentContentOperationsManager::MoveNodeRange( SwNodeRange& rRange, SwNod
m_rDoc.GetIDocumentUndoRedo().AppendUndo(pUndo);
}
- delete pSaveInsPos;
+ pSaveInsPos.reset();
if( bUpdateFootnote )
{
More information about the Libreoffice-commits
mailing list