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

loplugin:useuniqueptr in E3dScene

Change-Id: Ia2de7248406b47539ff40d81491ec1541c0c7bcd
Reviewed-on: https://gerrit.libreoffice.org/53709Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 1c944356
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <tools/b3dtrans.hxx> #include <tools/b3dtrans.hxx>
#include <svx/svxdllapi.h> #include <svx/svxdllapi.h>
#include <svx/obj3d.hxx> #include <svx/obj3d.hxx>
#include <memory>
namespace sdr { namespace properties { namespace sdr { namespace properties {
class BaseProperties; class BaseProperties;
...@@ -70,7 +71,7 @@ protected: ...@@ -70,7 +71,7 @@ protected:
B3dCamera aCameraSet; B3dCamera aCameraSet;
Camera3D aCamera; Camera3D aCamera;
Imp3DDepthRemapper* mp3DDepthRemapper; mutable std::unique_ptr<Imp3DDepthRemapper> mp3DDepthRemapper;
// Flag to determine if only selected objects should be drawn // Flag to determine if only selected objects should be drawn
bool bDrawOnlySelected : 1; bool bDrawOnlySelected : 1;
......
...@@ -233,11 +233,7 @@ basegfx::B2DPolyPolygon E3dScene::TakeXorPoly() const ...@@ -233,11 +233,7 @@ basegfx::B2DPolyPolygon E3dScene::TakeXorPoly() const
void E3dScene::ImpCleanup3DDepthMapper() void E3dScene::ImpCleanup3DDepthMapper()
{ {
if(mp3DDepthRemapper) mp3DDepthRemapper.reset();
{
delete mp3DDepthRemapper;
mp3DDepthRemapper = nullptr;
}
} }
sal_uInt32 E3dScene::RemapOrdNum(sal_uInt32 nNewOrdNum) const sal_uInt32 E3dScene::RemapOrdNum(sal_uInt32 nNewOrdNum) const
...@@ -248,7 +244,7 @@ sal_uInt32 E3dScene::RemapOrdNum(sal_uInt32 nNewOrdNum) const ...@@ -248,7 +244,7 @@ sal_uInt32 E3dScene::RemapOrdNum(sal_uInt32 nNewOrdNum) const
if(nObjCount > 1) if(nObjCount > 1)
{ {
const_cast<E3dScene*>(this)->mp3DDepthRemapper = new Imp3DDepthRemapper(*this); mp3DDepthRemapper.reset(new Imp3DDepthRemapper(*this));
} }
} }
......
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