diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-01-17 15:21:50 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-01-18 14:39:03 +0100 |
commit | 59a8d22cf3073e240899872b7dc193ddd4d19ef4 (patch) | |
tree | 716bbd25831c43986d45b58af530474e45f2eeb2 | |
parent | fd31291cd564087ed71b8acdf79fb6797fdb06e7 (diff) |
use unique_ptr in SwTextNode
Change-Id: I4962d3480e9318c02d5cb8f031c0fcb1ab19208d
Reviewed-on: https://gerrit.libreoffice.org/66570
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Jenkins
-rw-r--r-- | sw/source/core/txtnode/txtedt.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index e09675f38dd2..358669f3fba6 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -1893,11 +1893,9 @@ void SwTextNode::TransliterateText( { // here we may transliterate over complete language portions... - SwLanguageIterator* pIter; + std::unique_ptr<SwLanguageIterator> pIter; if( rTrans.needLanguageForTheMode() ) - pIter = new SwLanguageIterator( *this, nStt ); - else - pIter = nullptr; + pIter.reset(new SwLanguageIterator( *this, nStt )); sal_Int32 nEndPos = 0; LanguageType nLang = LANGUAGE_NONE; @@ -1934,7 +1932,6 @@ void SwTextNode::TransliterateText( nStt = nEndPos; } while( nEndPos < nEnd && pIter && pIter->Next() ); - delete pIter; } if (!aChanges.empty()) |