diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-14 14:36:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-17 07:23:22 +0200 |
commit | db3860062ebf4109f48139c2556ff4041aff5d6e (patch) | |
tree | b6ab4df909c8922e48a9c4eefa9a8f0f6a47c41f /lingucomponent/source | |
parent | 846f557fd591626931a9dadb38180786e090104c (diff) |
extend loplugin useuniqueptr to OUString pointers
Change-Id: Ieb5bab3895e1edaff497c4a1a88303ccac097edc
Reviewed-on: https://gerrit.libreoffice.org/39948
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'lingucomponent/source')
-rw-r--r-- | lingucomponent/source/spellcheck/spell/sspellimp.cxx | 6 | ||||
-rw-r--r-- | lingucomponent/source/spellcheck/spell/sspellimp.hxx | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx index 97b5c48a1676..e541a5ef314e 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx @@ -89,7 +89,6 @@ SpellChecker::~SpellChecker() delete[] m_aDicts; } delete[] m_aDLocs; - delete[] m_aDNames; if (m_pPropHelper) { m_pPropHelper->RemoveAsPropListener(); @@ -201,7 +200,7 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales() m_aDicts = new Hunspell* [m_nNumDict]; m_aDEncs.reset( new rtl_TextEncoding [m_nNumDict] ); m_aDLocs = new Locale [m_nNumDict]; - m_aDNames = new OUString [m_nNumDict]; + m_aDNames.reset( new OUString [m_nNumDict] ); k = 0; for (aDictIt = aDics.begin(); aDictIt != aDics.end(); ++aDictIt) { @@ -242,8 +241,7 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales() m_aDEncs.reset(); delete[] m_aDLocs; m_aDLocs = nullptr; - delete[] m_aDNames; - m_aDNames = nullptr; + m_aDNames.reset(); m_aSuppLocales.realloc(0); } } diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.hxx b/lingucomponent/source/spellcheck/spell/sspellimp.hxx index 3a61900e8c15..285ab715ad0a 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.hxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.hxx @@ -58,7 +58,7 @@ class SpellChecker : Hunspell ** m_aDicts; std::unique_ptr<rtl_TextEncoding[]> m_aDEncs; Locale * m_aDLocs; - OUString * m_aDNames; + std::unique_ptr<OUString[]> m_aDNames; sal_Int32 m_nNumDict; ::comphelper::OInterfaceContainerHelper2 m_aEvtListeners; |