diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-04 10:47:56 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-10 08:30:54 +0200 |
commit | 208f91edea145fd76ffd67f238079f11c4142082 (patch) | |
tree | 6c9396dc57fa67c379182d5dbabd0bca5ac9ebde | |
parent | 62cf9b479232c72648dbca426aff1309b897dc7a (diff) |
loplugin:useuniqueptr in SwTOXInternational
Change-Id: I6d0687f2dbfc1b3d168440c7192ddaf7869ef58d
Reviewed-on: https://gerrit.libreoffice.org/57199
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sw/source/core/inc/txmsrt.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/tox/txmsrt.cxx | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/core/inc/txmsrt.hxx b/sw/source/core/inc/txmsrt.hxx index 2bb74d78d725..61091af43b8a 100644 --- a/sw/source/core/inc/txmsrt.hxx +++ b/sw/source/core/inc/txmsrt.hxx @@ -69,8 +69,8 @@ struct TextAndReading class SwTOXInternational { - IndexEntrySupplierWrapper* m_pIndexWrapper; - CharClass* m_pCharClass; + std::unique_ptr<IndexEntrySupplierWrapper> m_pIndexWrapper; + std::unique_ptr<CharClass> m_pCharClass; LanguageType m_eLang; OUString m_sSortAlgorithm; SwTOIOptions m_nOptions; diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx index ffc6e222081c..41b66760ec20 100644 --- a/sw/source/core/tox/txmsrt.cxx +++ b/sw/source/core/tox/txmsrt.cxx @@ -69,7 +69,7 @@ SwTOXInternational::SwTOXInternational( const SwTOXInternational& rIntl ) : void SwTOXInternational::Init() { - m_pIndexWrapper = new IndexEntrySupplierWrapper(); + m_pIndexWrapper.reset( new IndexEntrySupplierWrapper() ); const lang::Locale aLcl( LanguageTag::convertToLocale( m_eLang ) ); m_pIndexWrapper->SetLocale( aLcl ); @@ -86,14 +86,14 @@ void SwTOXInternational::Init() else m_pIndexWrapper->LoadAlgorithm( aLcl, m_sSortAlgorithm, SW_COLLATOR_IGNORES ); - m_pCharClass = new CharClass( LanguageTag( aLcl )); + m_pCharClass.reset( new CharClass( LanguageTag( aLcl )) ); } SwTOXInternational::~SwTOXInternational() { - delete m_pCharClass; - delete m_pIndexWrapper; + m_pCharClass.reset(); + m_pIndexWrapper.reset(); } OUString SwTOXInternational::ToUpper( const OUString& rStr, sal_Int32 nPos ) const |