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/osx | |
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/osx')
-rw-r--r-- | vcl/osx/salinst.cxx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx index 46a52bd9b213..7886f8efa129 100644 --- a/vcl/osx/salinst.cxx +++ b/vcl/osx/salinst.cxx @@ -726,14 +726,14 @@ void AquaSalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList ) NSString* pType = i < nTypeCount ? [pTypes objectAtIndex: i] : nil; if( pName ) { - SalPrinterQueueInfo* pInfo = new SalPrinterQueueInfo; + std::unique_ptr<SalPrinterQueueInfo> pInfo(new SalPrinterQueueInfo); pInfo->maPrinterName = GetOUString( pName ); if( pType ) pInfo->maDriver = GetOUString( pType ); pInfo->mnStatus = PrintQueueFlags::NONE; pInfo->mnJobs = 0; - pList->Add( pInfo ); + pList->Add( std::move(pInfo) ); } } } @@ -742,11 +742,6 @@ void AquaSalInstance::GetPrinterQueueState( SalPrinterQueueInfo* ) { } -void AquaSalInstance::DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo ) -{ - delete pInfo; -} - OUString AquaSalInstance::GetDefaultPrinter() { // #i113170# may not be the main thread if called from UNO API |