diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-26 10:01:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-31 07:30:07 +0100 |
commit | 9078b0b8f48b161ad5b880c31a4413f9e706f01b (patch) | |
tree | 656415a9a7fac4346bfa222558cffcb31bb0ee38 /vcl/win | |
parent | 0df2d8726850eef54a1ed980bc7f33cc67265e12 (diff) |
loplugin:useuniqueptr in DeletePrinterQueueInfo
Change-Id: Ia124a4af642e449dc05f5bae2d5ca766bd67bd68
Reviewed-on: https://gerrit.libreoffice.org/62388
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/gdi/salprn.cxx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx index 92ca44f6af3d..51eb8f9bb602 100644 --- a/vcl/win/gdi/salprn.cxx +++ b/vcl/win/gdi/salprn.cxx @@ -163,11 +163,11 @@ void WinSalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList ) { for ( i = 0; i < nInfoPrn4; i++ ) { - SalPrinterQueueInfo* pInfo = new SalPrinterQueueInfo; + std::unique_ptr<SalPrinterQueueInfo> pInfo(new SalPrinterQueueInfo); pInfo->maPrinterName = o3tl::toU(pWinInfo4[i].pPrinterName); pInfo->mnStatus = PrintQueueFlags::NONE; pInfo->mnJobs = 0; - pList->Add( pInfo ); + pList->Add( std::move(pInfo) ); } } std::free( pWinInfo4 ); @@ -211,11 +211,6 @@ void WinSalInstance::GetPrinterQueueState( SalPrinterQueueInfo* pInfo ) } } -void WinSalInstance::DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo ) -{ - delete pInfo; -} - OUString WinSalInstance::GetDefaultPrinter() { DWORD nChars = 0; |