Kaydet (Commit) d630a53e authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in HangulHanjaEditDictDialog

Change-Id: Ic1e98a7efdd75a6c940c5ce81bfb414711c4ab37
Reviewed-on: https://gerrit.libreoffice.org/55534Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 8cfe6315
......@@ -1663,7 +1663,7 @@ namespace svx
if( nCnt )
{
if( !m_pSuggestions )
m_pSuggestions = new SuggestionList;
m_pSuggestions.reset(new SuggestionList);
const OUString* pSugg = aEntries.getConstArray();
sal_uInt32 n = 0;
......@@ -1710,7 +1710,7 @@ namespace svx
{
//set suggestion
if( !m_pSuggestions )
m_pSuggestions = new SuggestionList;
m_pSuggestions.reset(new SuggestionList);
m_pSuggestions->Set( aTxt, nEntryNum );
}
......@@ -1787,8 +1787,7 @@ namespace svx
void HangulHanjaEditDictDialog::dispose()
{
delete m_pSuggestions;
m_pSuggestions = nullptr;
m_pSuggestions.reset();
m_aBookLB.clear();
m_aOriginalLB.clear();
m_aEdit1.clear();
......
......@@ -271,7 +271,7 @@ namespace svx
sal_uInt32 m_nCurrentDict;
OUString m_aOriginal;
SuggestionList* m_pSuggestions;
std::unique_ptr<SuggestionList> m_pSuggestions;
VclPtr<ListBox> m_aBookLB;
VclPtr<ComboBox> m_aOriginalLB;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment