summaryrefslogtreecommitdiff
path: root/vcl/win
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-11-27 15:04:28 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-11-27 23:36:55 +0100
commit401a3d2336bf46b38235c498ff86ff675d0de759 (patch)
tree38f85993647e4aea76f435949a17864ef984ed30 /vcl/win
parente75c983acfe0c496106ab1ef2a566408b8955cb8 (diff)
loplugin:useuniqueptr (clang-cl)
Change-Id: Id9020bef2ce0fa9a7a70f48d27fb57735c6f57ca Reviewed-on: https://gerrit.libreoffice.org/45340 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/win')
-rw-r--r--vcl/win/gdi/salvd.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/vcl/win/gdi/salvd.cxx b/vcl/win/gdi/salvd.cxx
index 615bf3ee2207..17b32862d52f 100644
--- a/vcl/win/gdi/salvd.cxx
+++ b/vcl/win/gdi/salvd.cxx
@@ -148,7 +148,6 @@ SalVirtualDevice* WinSalInstance::CreateVirtualDevice( SalGraphics* pSGraphics,
WinSalVirtualDevice::WinSalVirtualDevice(HDC hDC, HBITMAP hBMP, sal_uInt16 nBitCount, bool bForeignDC, long nWidth, long nHeight)
: mhLocalDC(hDC), // HDC or 0 for Cache Device
mhBmp(hBMP), // Memory Bitmap
- mpGraphics(nullptr), // current VirDev graphics
mnBitCount(nBitCount), // BitCount (0 or 1)
mbGraphics(false), // is Graphics used
mbForeignDC(bForeignDC), // uses a foreign DC instead of a bitmap
@@ -186,8 +185,7 @@ WinSalVirtualDevice::~WinSalVirtualDevice()
DeleteDC( mpGraphics->getHDC() );
if( mhBmp )
DeleteBitmap( mhBmp );
- delete mpGraphics;
- mpGraphics = nullptr;
+ mpGraphics.reset();
}
SalGraphics* WinSalVirtualDevice::AcquireGraphics()
@@ -198,7 +196,7 @@ SalGraphics* WinSalVirtualDevice::AcquireGraphics()
if ( mpGraphics )
mbGraphics = true;
- return mpGraphics;
+ return mpGraphics.get();
}
void WinSalVirtualDevice::ReleaseGraphics( SalGraphics* )