diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-23 14:24:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-24 08:26:57 +0200 |
commit | 63dbd42d9bdc2eba7ac45a4f5c761f0806a0ea78 (patch) | |
tree | a06a210763156cf5849afc1a06498b9a55e85ab2 /vcl | |
parent | ab2b4c0e1378072f05eee6b2c1bf6df311d6f1b3 (diff) |
loplugin:useuniqueptr in Printer
Change-Id: Icdc99c51fe3548f96f5da5ccd3ac88bfccffc63c
Reviewed-on: https://gerrit.libreoffice.org/53354
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/print.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index b697e9e01557..fa43dedea7a4 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -483,7 +483,7 @@ void Printer::ImplInitData() mpInfoPrinter = nullptr; mpPrinter = nullptr; mpDisplayDev = nullptr; - mpPrinterOptions = new PrinterOptions; + mpPrinterOptions.reset(new PrinterOptions); // Add printer to the list ImplSVData* pSVData = ImplGetSVData(); @@ -943,8 +943,7 @@ void Printer::dispose() SAL_WARN_IF( IsPrinting(), "vcl.gdi", "Printer::~Printer() - Job is printing" ); SAL_WARN_IF( IsJobActive(), "vcl.gdi", "Printer::~Printer() - Job is active" ); - delete mpPrinterOptions; - mpPrinterOptions = nullptr; + mpPrinterOptions.reset(); ReleaseGraphics(); if ( mpInfoPrinter ) |