From 1800cac964c145d9aa7e0048e0e545463901a03c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 4 Sep 2018 13:37:07 +0200 Subject: loplugin:useuniqueptr in ViewObjectContactOfPageObj Change-Id: I4f7af7bb8da2b4bfb27ab7cf748677fc3fa6fdbc Reviewed-on: https://gerrit.libreoffice.org/60004 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svx/source/sdr/contact/viewobjectcontactofpageobj.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'svx/source/sdr/contact') diff --git a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx index db64344e0447..e22cbc184891 100644 --- a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx @@ -313,13 +313,11 @@ ViewObjectContactOfPageObj::~ViewObjectContactOfPageObj() { // remember candidate and reset own pointer to avoid action when createPrimitive2DSequence() // would be called for any reason - PagePrimitiveExtractor* pCandidate = mpExtractor; - mpExtractor = nullptr; + std::unique_ptr pCandidate = std::move(mpExtractor); // also reset the StartPage to avoid ActionChanged() forwardings in the // PagePrimitiveExtractor::InvalidatePartOfView() implementation pCandidate->SetStartPage(nullptr); - delete pCandidate; } } -- cgit