summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-16 14:09:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-19 08:58:46 +0200
commit9b0a74a4e0fe0c784da62a730d10e8c75e4c7bad (patch)
tree676bb10742f9b11eb4bc222571935cc9b2e37cc3 /drawinglayer
parentf9894d68ea67f5fc5810bfb4ece5d9af0c16749a (diff)
loplugin:useuniqueptr in ZBufferProcessor3D
Change-Id: I73005afdaf20efe15321a2a073beb3ae4f7a63e3
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/processor3d/zbufferprocessor3d.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx
index ba12a85ecf12..ab25e329a8b8 100644
--- a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx
+++ b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx
@@ -430,7 +430,7 @@ namespace drawinglayer
// back to front
if(!mpRasterPrimitive3Ds)
{
- const_cast< ZBufferProcessor3D* >(this)->mpRasterPrimitive3Ds = new std::vector< RasterPrimitive3D >;
+ const_cast< ZBufferProcessor3D* >(this)->mpRasterPrimitive3Ds.reset( new std::vector< RasterPrimitive3D > );
}
mpRasterPrimitive3Ds->push_back(RasterPrimitive3D(
@@ -494,7 +494,7 @@ namespace drawinglayer
// back to front
if(!mpRasterPrimitive3Ds)
{
- const_cast< ZBufferProcessor3D* >(this)->mpRasterPrimitive3Ds = new std::vector< RasterPrimitive3D >;
+ const_cast< ZBufferProcessor3D* >(this)->mpRasterPrimitive3Ds.reset( new std::vector< RasterPrimitive3D > );
}
mpRasterPrimitive3Ds->push_back(RasterPrimitive3D(
@@ -598,18 +598,18 @@ namespace drawinglayer
maRasterRange.expand(basegfx::B2DPoint(mrBZPixelRaster.getWidth(), nStopLine));
// create the raster converter
- mpZBufferRasterConverter3D = new ZBufferRasterConverter3D(mrBZPixelRaster, *this);
+ mpZBufferRasterConverter3D.reset( new ZBufferRasterConverter3D(mrBZPixelRaster, *this) );
}
ZBufferProcessor3D::~ZBufferProcessor3D()
{
- delete mpZBufferRasterConverter3D;
+ mpZBufferRasterConverter3D.reset();
if(mpRasterPrimitive3Ds)
{
OSL_FAIL("ZBufferProcessor3D: destructed, but there are unrendered transparent geometries. Use ZBufferProcessor3D::finish() to render these (!)");
- delete mpRasterPrimitive3Ds;
}
+ mpRasterPrimitive3Ds.reset();
}
void ZBufferProcessor3D::finish()
@@ -653,8 +653,7 @@ namespace drawinglayer
// delete them to signal the destructor that all is done and
// to allow asserting there
- delete mpRasterPrimitive3Ds;
- mpRasterPrimitive3Ds = nullptr;
+ mpRasterPrimitive3Ds.reset();
}
}
} // end of namespace processor3d