diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-15 16:08:53 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-17 10:16:35 +0200 |
commit | 2ea733e525773e5631210e9503fd8415a72c2ea9 (patch) | |
tree | fa81fb4a05bc5b3235b6e9b971d956b2d1d49c57 /vcl | |
parent | 3b7245007d8c6bbe2cc095ec1c4ce37fd6d05b87 (diff) |
loplugin:useuniqueptr in SalXLib
Change-Id: Id3f8cf95479aa4e03bc6dcb05c5475ae462cfe5a
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/unx/saldisp.hxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/app/saldata.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx index 546d6d7a6664..259af28e63a8 100644 --- a/vcl/inc/unx/saldisp.hxx +++ b/vcl/inc/unx/saldisp.hxx @@ -159,7 +159,7 @@ protected: fd_set aExceptionFDS_; Display *m_pDisplay; - SalI18N_InputMethod *m_pInputMethod; + std::unique_ptr<SalI18N_InputMethod> m_pInputMethod; public: SalXLib(); @@ -181,7 +181,7 @@ public: virtual bool CheckTimeout( bool bExecuteTimers = true ); - SalI18N_InputMethod* GetInputMethod() const { return m_pInputMethod; } + SalI18N_InputMethod* GetInputMethod() const { return m_pInputMethod.get(); } Display* GetDisplay() const { return m_pDisplay; } }; diff --git a/vcl/unx/generic/app/saldata.cxx b/vcl/unx/generic/app/saldata.cxx index 29b434eb6be8..a424dc5e05ef 100644 --- a/vcl/unx/generic/app/saldata.cxx +++ b/vcl/unx/generic/app/saldata.cxx @@ -376,7 +376,7 @@ SalXLib::~SalXLib() close (m_pTimeoutFDS[0]); close (m_pTimeoutFDS[1]); - delete m_pInputMethod; + m_pInputMethod.reset(); } static Display *OpenX11Display(OString& rDisplay) @@ -433,7 +433,7 @@ static Display *OpenX11Display(OString& rDisplay) void SalXLib::Init() { - m_pInputMethod = new SalI18N_InputMethod; + m_pInputMethod.reset( new SalI18N_InputMethod ); m_pInputMethod->SetLocale(); XrmInitialize(); |