[Libreoffice-commits] core.git: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Oct 24 19:57:47 UTC 2018
sw/source/core/undo/unins.cxx | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
New commits:
commit 9db2d95e1e094c61efe20fecf80fe2d44ca22bd7
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Oct 22 09:54:26 2018 +0100
Commit: Caolán McNamara <caolanm at 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 <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at 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
{
More information about the Libreoffice-commits
mailing list