summaryrefslogtreecommitdiff
path: root/vcl/headless
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-26 10:01:08 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-31 07:30:07 +0100
commit9078b0b8f48b161ad5b880c31a4413f9e706f01b (patch)
tree656415a9a7fac4346bfa222558cffcb31bb0ee38 /vcl/headless
parent0df2d8726850eef54a1ed980bc7f33cc67265e12 (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/headless')
-rw-r--r--vcl/headless/svpprn.cxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/vcl/headless/svpprn.cxx b/vcl/headless/svpprn.cxx
index 590d04be03db..0bc0ad3dbcbe 100644
--- a/vcl/headless/svpprn.cxx
+++ b/vcl/headless/svpprn.cxx
@@ -213,7 +213,7 @@ void SvpSalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList )
{
const PrinterInfo& rInfo( rManager.getPrinterInfo(printer) );
// create new entry
- SalPrinterQueueInfo* pInfo = new SalPrinterQueueInfo;
+ std::unique_ptr<SalPrinterQueueInfo> pInfo(new SalPrinterQueueInfo);
pInfo->maPrinterName = printer;
pInfo->maDriver = rInfo.m_aDriverName;
pInfo->maLocation = rInfo.m_aLocation;
@@ -230,15 +230,10 @@ void SvpSalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList )
}
}
- pList->Add( pInfo );
+ pList->Add( std::move(pInfo) );
}
}
-void SvpSalInstance::DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo )
-{
- delete pInfo;
-}
-
void SvpSalInstance::GetPrinterQueueState( SalPrinterQueueInfo* )
{
}