diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-23 14:16:36 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-25 08:25:28 +0200 |
commit | 182197448fc206649324fa15cf5aeaf7d01723ed (patch) | |
tree | 54622b47cde68721a0fef01233f87b2708387352 /vcl/quartz | |
parent | b84244378d411b83355b8763d3505031dd5ec324 (diff) |
loplugin:useuniqueptr in VirtualDevice
Change-Id: I7c70f9c590dd63cca1dce16ce184fc7e14922de2
Reviewed-on: https://gerrit.libreoffice.org/53353
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/quartz')
-rw-r--r-- | vcl/quartz/salvd.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vcl/quartz/salvd.cxx b/vcl/quartz/salvd.cxx index 3d9d700cb4d9..03f37fe67366 100644 --- a/vcl/quartz/salvd.cxx +++ b/vcl/quartz/salvd.cxx @@ -36,7 +36,7 @@ #include <quartz/salvd.h> #include <quartz/utils.h> -SalVirtualDevice* AquaSalInstance::CreateVirtualDevice( SalGraphics* pGraphics, +std::unique_ptr<SalVirtualDevice> AquaSalInstance::CreateVirtualDevice( SalGraphics* pGraphics, long &nDX, long &nDY, DeviceFormat eFormat, const SystemGraphicsData *pData ) @@ -47,18 +47,18 @@ SalVirtualDevice* AquaSalInstance::CreateVirtualDevice( SalGraphics* pGraphics, #ifdef IOS if( pData ) { - return new AquaSalVirtualDevice( static_cast< AquaSalGraphics* >( pGraphics ), - nDX, nDY, eFormat, pData ); + return std::unique_ptr<SalVirtualDevice>(new AquaSalVirtualDevice( static_cast< AquaSalGraphics* >( pGraphics ), + nDX, nDY, eFormat, pData )); } else { - AquaSalVirtualDevice* pNew = new AquaSalVirtualDevice( NULL, nDX, nDY, eFormat, NULL ); + std::unique_ptr<SalVirtualDevice> pNew(new AquaSalVirtualDevice( NULL, nDX, nDY, eFormat, NULL )); pNew->SetSize( nDX, nDY ); return pNew; } #else - return new AquaSalVirtualDevice( static_cast< AquaSalGraphics* >( pGraphics ), - nDX, nDY, eFormat, pData ); + return std::unique_ptr<SalVirtualDevice>(new AquaSalVirtualDevice( static_cast< AquaSalGraphics* >( pGraphics ), + nDX, nDY, eFormat, pData )); #endif } |