From dbb1dbe7a741415acf1132a29aba7cff5dfe638c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 23 Apr 2018 15:23:08 +0200 Subject: loplugin:useuniqueptr in X11SalData Change-Id: I61a6d5cc5690a2899986ec831655e480a1f414d1 Reviewed-on: https://gerrit.libreoffice.org/53360 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vcl/unx/generic/app/saldata.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'vcl/unx/generic/app/saldata.cxx') diff --git a/vcl/unx/generic/app/saldata.cxx b/vcl/unx/generic/app/saldata.cxx index 3a87ca9d0e8b..9fb0aa5c799a 100644 --- a/vcl/unx/generic/app/saldata.cxx +++ b/vcl/unx/generic/app/saldata.cxx @@ -270,13 +270,12 @@ void X11SalData::DeleteDisplay() { delete GetDisplay(); SetDisplay( nullptr ); - delete pXLib_; - pXLib_ = nullptr; + pXLib_.reset(); } void X11SalData::Init() { - pXLib_ = new SalXLib(); + pXLib_.reset(new SalXLib()); pXLib_->Init(); } -- cgit