diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-16 09:59:23 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-16 10:48:31 +0000 |
commit | 5fb99f271a571301f8246addae89738016926d6d (patch) | |
tree | b44f864cce56009f48beff28463ae8debe28aca2 /filter/source/t602 | |
parent | 0f4f5621d194c9221b55bb4a20a251a0bb497d69 (diff) |
new loplugin: useuniqueptr: filter
Change-Id: Ie5cee5d7dd067df121397b60a7adc85c62906e54
Reviewed-on: https://gerrit.libreoffice.org/33155
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter/source/t602')
-rw-r--r-- | filter/source/t602/t602filter.cxx | 5 | ||||
-rw-r--r-- | filter/source/t602/t602filter.hxx | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx index a7fe34b36a79..924d475ce826 100644 --- a/filter/source/t602/t602filter.cxx +++ b/filter/source/t602/t602filter.cxx @@ -917,7 +917,6 @@ T602ImportFilterDialog::T602ImportFilterDialog() : T602ImportFilterDialog::~T602ImportFilterDialog() { - delete mpResMgr; } // XLocalizable @@ -1118,14 +1117,14 @@ bool T602ImportFilterDialog::OptionsDlg() void T602ImportFilterDialog::initLocale() { - mpResMgr = ResMgr::CreateResMgr( "t602filter", LanguageTag( meLocale) ); + mpResMgr.reset( ResMgr::CreateResMgr( "t602filter", LanguageTag( meLocale) ) ); } ResMgr* T602ImportFilterDialog::getResMgr() { if( !mpResMgr ) initLocale(); - return mpResMgr; + return mpResMgr.get(); } void SAL_CALL T602ImportFilterDialog::setTitle( const OUString& ) diff --git a/filter/source/t602/t602filter.hxx b/filter/source/t602/t602filter.hxx index d8dbbdd3439f..59d07a21df70 100644 --- a/filter/source/t602/t602filter.hxx +++ b/filter/source/t602/t602filter.hxx @@ -95,7 +95,7 @@ class T602ImportFilterDialog : public cppu::WeakImplHelper < > { css::lang::Locale meLocale; - ResMgr *mpResMgr; + std::unique_ptr<ResMgr> mpResMgr; bool OptionsDlg(); ResMgr* getResMgr(); OUString getResStr( sal_Int16 resid ); |