diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-12 09:34:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-12 15:52:28 +0200 |
commit | 0088f365b1c1e3103b310ac3371bc5c918fe617e (patch) | |
tree | 60b6212265c46dd6a5681a71ac7b24cceebcca0a /lingucomponent/source/spellcheck/spell/sspellimp.cxx | |
parent | d65567230f283a6ed228755a3be85e95cde2d677 (diff) |
loplugin:useuniqueptr in lingucomponent
Change-Id: I5d668718620114cb8b9d53375497a4d0b1759abb
Reviewed-on: https://gerrit.libreoffice.org/39852
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'lingucomponent/source/spellcheck/spell/sspellimp.cxx')
-rw-r--r-- | lingucomponent/source/spellcheck/spell/sspellimp.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx index a3c9696fa142..97b5c48a1676 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx @@ -88,7 +88,6 @@ SpellChecker::~SpellChecker() } delete[] m_aDicts; } - delete[] m_aDEncs; delete[] m_aDLocs; delete[] m_aDNames; if (m_pPropHelper) @@ -200,7 +199,7 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales() // add dictionary information m_aDicts = new Hunspell* [m_nNumDict]; - m_aDEncs = new rtl_TextEncoding [m_nNumDict]; + m_aDEncs.reset( new rtl_TextEncoding [m_nNumDict] ); m_aDLocs = new Locale [m_nNumDict]; m_aDNames = new OUString [m_nNumDict]; k = 0; @@ -240,8 +239,7 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales() m_nNumDict = 0; delete[] m_aDicts; m_aDicts = nullptr; - delete[] m_aDEncs; - m_aDEncs = nullptr; + m_aDEncs.reset(); delete[] m_aDLocs; m_aDLocs = nullptr; delete[] m_aDNames; |