Kaydet (Commit) dbb1dbe7 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in X11SalData

Change-Id: I61a6d5cc5690a2899986ec831655e480a1f414d1
Reviewed-on: https://gerrit.libreoffice.org/53360Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 18219744
......@@ -56,7 +56,7 @@ class VCLPLUG_GEN_PUBLIC X11SalData : public GenericUnixSalData
XIOErrorHandler m_aOrigXIOErrorHandler;
protected:
SalXLib *pXLib_;
std::unique_ptr<SalXLib> pXLib_;
public:
X11SalData( GenericUnixSalDataType t, SalInstance *pInstance );
......@@ -70,7 +70,7 @@ public:
void DeleteDisplay(); // for shutdown
SalXLib* GetLib() const { return pXLib_; }
SalXLib* GetLib() const { return pXLib_.get(); }
static void Timeout();
......
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment