summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-06-08 13:32:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-06-09 13:11:47 +0200
commit6d008c9e1dbe4240a10c8789860dc30b0cb0b2d5 (patch)
tree25330d9240ea3ef0687809ab8286c1e2c4b1c75f /vcl/unx/gtk
parent84efebb5304b2ebbc03e7743b131ce4d5ad10c03 (diff)
hold and return SalPrinter with std::unique_ptr
and remove DestroyPrinter, doesn't not anything beyond delete'ing the object Change-Id: I25e14b962e65a0e131fae3ff5771c82920a4e375 Reviewed-on: https://gerrit.libreoffice.org/55498 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/unx/gtk')
-rw-r--r--vcl/unx/gtk/gtkinst.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/unx/gtk/gtkinst.cxx b/vcl/unx/gtk/gtkinst.cxx
index 4e168ca6dcf2..926ef9b3f9d0 100644
--- a/vcl/unx/gtk/gtkinst.cxx
+++ b/vcl/unx/gtk/gtkinst.cxx
@@ -280,12 +280,12 @@ SalInfoPrinter* GtkInstance::CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo,
#endif
}
-SalPrinter* GtkInstance::CreatePrinter( SalInfoPrinter* pInfoPrinter )
+std::unique_ptr<SalPrinter> GtkInstance::CreatePrinter( SalInfoPrinter* pInfoPrinter )
{
EnsureInit();
#if defined ENABLE_GTK_PRINT || GTK_CHECK_VERSION(3,0,0)
mbPrinterInit = true;
- return new GtkSalPrinter( pInfoPrinter );
+ return std::unique_ptr<SalPrinter>(new GtkSalPrinter( pInfoPrinter ));
#else
return Superclass_t::CreatePrinter( pInfoPrinter );
#endif