loplugin:useuniqueptr in X11SalData
Change-Id: I61a6d5cc5690a2899986ec831655e480a1f414d1 Reviewed-on: https://gerrit.libreoffice.org/53360 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -56,7 +56,7 @@ class VCLPLUG_GEN_PUBLIC X11SalData : public GenericUnixSalData
|
|||||||
XIOErrorHandler m_aOrigXIOErrorHandler;
|
XIOErrorHandler m_aOrigXIOErrorHandler;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SalXLib *pXLib_;
|
std::unique_ptr<SalXLib> pXLib_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
X11SalData( GenericUnixSalDataType t, SalInstance *pInstance );
|
X11SalData( GenericUnixSalDataType t, SalInstance *pInstance );
|
||||||
@@ -70,7 +70,7 @@ public:
|
|||||||
|
|
||||||
void DeleteDisplay(); // for shutdown
|
void DeleteDisplay(); // for shutdown
|
||||||
|
|
||||||
SalXLib* GetLib() const { return pXLib_; }
|
SalXLib* GetLib() const { return pXLib_.get(); }
|
||||||
|
|
||||||
static void Timeout();
|
static void Timeout();
|
||||||
|
|
||||||
|
@@ -270,13 +270,12 @@ void X11SalData::DeleteDisplay()
|
|||||||
{
|
{
|
||||||
delete GetDisplay();
|
delete GetDisplay();
|
||||||
SetDisplay( nullptr );
|
SetDisplay( nullptr );
|
||||||
delete pXLib_;
|
pXLib_.reset();
|
||||||
pXLib_ = nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void X11SalData::Init()
|
void X11SalData::Init()
|
||||||
{
|
{
|
||||||
pXLib_ = new SalXLib();
|
pXLib_.reset(new SalXLib());
|
||||||
pXLib_->Init();
|
pXLib_->Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user