summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-15 16:10:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-17 10:16:35 +0200
commitfa286c8934745410aee34ee61ff2b44a67b5e36c (patch)
treed1b02c7bbdf4d4ee54f70b46d78ef1cddd145894 /vcl
parent2ea733e525773e5631210e9503fd8415a72c2ea9 (diff)
loplugin:useuniqueptr in OpenGLSalGraphicsImpl
Change-Id: I0d0e4da9c081c890ffd7dcaf051e3a3900345c35
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/openglgdiimpl.hxx2
-rw-r--r--vcl/opengl/gdiimpl.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/vcl/inc/openglgdiimpl.hxx b/vcl/inc/openglgdiimpl.hxx
index 7bc6644fdc48..aa55b970e64c 100644
--- a/vcl/inc/openglgdiimpl.hxx
+++ b/vcl/inc/openglgdiimpl.hxx
@@ -74,7 +74,7 @@ protected:
OpenGLProgram* mpProgram;
/// This idle handler is used to swap buffers after rendering.
- OpenGLFlushIdle *mpFlush;
+ std::unique_ptr<OpenGLFlushIdle> mpFlush;
// clipping
vcl::Region maClipRegion;
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 608b28dbb927..afe0157c520a 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -94,7 +94,7 @@ OpenGLSalGraphicsImpl::~OpenGLSalGraphicsImpl()
if( !IsOffscreen() && mnDrawCountAtFlush != mnDrawCount )
VCL_GL_INFO( "Destroying un-flushed on-screen graphics" );
- delete mpFlush;
+ mpFlush.reset();
ReleaseContext();
}