Kaydet (Commit) a1ce78b0 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in E3dView

Change-Id: I2945d810a05f0f9d44ac17c20f5a82e05bd4981e
Reviewed-on: https://gerrit.libreoffice.org/53712Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst b6025e6c
......@@ -25,6 +25,7 @@
#include <svx/deflt3d.hxx>
#include <basegfx/point/b2dpoint.hxx>
#include <svx/svxdllapi.h>
#include <memory>
/*
* Forward declarations
......@@ -49,7 +50,7 @@ protected:
E3dDragConstraint eDragConstraint;
// Migrate selections
Impl3DMirrorConstructOverlay* mpMirrorOverlay;
std::unique_ptr<Impl3DMirrorConstructOverlay> mpMirrorOverlay;
void InitView();
......
......@@ -1395,7 +1395,7 @@ void E3dView::Start3DCreation()
// Show mirror polygon IMMEDIATELY
const SdrHdlList &aHdlList = GetHdlList();
mpMirrorOverlay = new Impl3DMirrorConstructOverlay(*this);
mpMirrorOverlay.reset(new Impl3DMirrorConstructOverlay(*this));
mpMirrorOverlay->SetMirrorAxis(aHdlList.GetHdl(SdrHdlKind::Ref1)->GetPos(), aHdlList.GetHdl(SdrHdlKind::Ref2)->GetPos());
}
......@@ -1485,11 +1485,7 @@ E3dView::~E3dView ()
void E3dView::ResetCreationActive ()
{
if(mpMirrorOverlay)
{
delete mpMirrorOverlay;
mpMirrorOverlay = nullptr;
}
mpMirrorOverlay.reset();
}
void E3dView::InitView ()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment