sw/source/core/undo/unins.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
New commits: commit 9db2d95e1e094c61efe20fecf80fe2d44ca22bd7 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Oct 22 09:54:26 2018 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Oct 24 21:57:22 2018 +0200 pvs-studio: silence V530 use std::unique_ptr less weirdly Change-Id: I24bcf03ca9277597aea6ccaac661c7e4e3869541 Reviewed-on: https://gerrit.libreoffice.org/62168 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx index 5db299b4e969..4b7fef996f36 100644 --- a/sw/source/core/undo/unins.cxx +++ b/sw/source/core/undo/unins.cxx @@ -755,15 +755,14 @@ void SwUndoReplace::Impl::RedoImpl(::sw::UndoRedoContext & rContext) if( pHistory ) { - auto pSave = std::move(pHistory); - SwHistory aHst; - pHistory.reset( &aHst ); + auto xSave = o3tl::make_unique<SwHistory>(); + std::swap(pHistory, xSave); + DelContentIndex( *rPam.GetMark(), *rPam.GetPoint() ); m_nSetPos = pHistory->Count(); - pHistory.release(); - pHistory = std::move(pSave); - pHistory->Move( 0, &aHst ); + std::swap(xSave, pHistory); + pHistory->Move(0, xSave.get()); } else { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits