diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-15 16:06:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-17 10:16:35 +0200 |
commit | 3b7245007d8c6bbe2cc095ec1c4ce37fd6d05b87 (patch) | |
tree | 2c9032ecff5003a798e5cf1b29044ccd5224cf10 /vcl/unx/generic/gdi/salvd.cxx | |
parent | 812aa0512d0f77673b4ccda1187cccd0c9352e48 (diff) |
loplugin:useuniqueptr in X11SalVirtualDevice
Change-Id: I812fb31ec802d2c20e2e82693be127d42df73a69
Diffstat (limited to 'vcl/unx/generic/gdi/salvd.cxx')
-rw-r--r-- | vcl/unx/generic/gdi/salvd.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/vcl/unx/generic/gdi/salvd.cxx b/vcl/unx/generic/gdi/salvd.cxx index 09367e1e8a25..3be1449de90f 100644 --- a/vcl/unx/generic/gdi/salvd.cxx +++ b/vcl/unx/generic/gdi/salvd.cxx @@ -171,8 +171,7 @@ X11SalVirtualDevice::X11SalVirtualDevice(SalGraphics const * pGraphics, long &nD X11SalVirtualDevice::~X11SalVirtualDevice() { - delete pGraphics_; - pGraphics_ = nullptr; + pGraphics_.reset(); if( GetDrawable() && !bExternPixmap_ ) XFreePixmap( GetXDisplay(), GetDrawable() ); @@ -186,7 +185,7 @@ SalGraphics* X11SalVirtualDevice::AcquireGraphics() if( pGraphics_ ) bGraphics_ = true; - return pGraphics_; + return pGraphics_.get(); } void X11SalVirtualDevice::ReleaseGraphics( SalGraphics* ) |