sw/source/filter/html/htmlftn.cxx | 5 ++--- sw/source/filter/html/wrthtml.hxx | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-)
New commits: commit cbb1f3814e59c97b36a6941c73ef45e008d8aea6 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Wed Jul 18 11:49:13 2018 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Jul 19 08:14:15 2018 +0200 loplugin:useuniqueptr in SwHTMLWriter Change-Id: I7017cbd4e572865353e10cea1463aeaba7adf439 Reviewed-on: https://gerrit.libreoffice.org/57690 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx index a34d13e2ea54..096fdcd9059b 100644 --- a/sw/source/filter/html/htmlftn.cxx +++ b/sw/source/filter/html/htmlftn.cxx @@ -273,7 +273,7 @@ Writer& OutHTML_SwFormatFootnote( Writer& rWrt, const SfxPoolItem& rHt ) } if( !rHTMLWrt.m_pFootEndNotes ) - rHTMLWrt.m_pFootEndNotes = new std::vector<SwTextFootnote*>; + rHTMLWrt.m_pFootEndNotes.reset(new std::vector<SwTextFootnote*>); rHTMLWrt.m_pFootEndNotes->insert( rHTMLWrt.m_pFootEndNotes->begin() + nPos, pTextFootnote ); OStringBuffer sOut; @@ -381,8 +381,7 @@ void SwHTMLWriter::OutFootEndNotes() "SwHTMLWriter::OutFootEndNotes: Number of endnotes does not match" ); #endif - delete m_pFootEndNotes; - m_pFootEndNotes = nullptr; + m_pFootEndNotes.reset(); m_nFootNote = m_nEndNote = 0; } diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx index 27ae06bd7bef..68495b7f15ad 100644 --- a/sw/source/filter/html/wrthtml.hxx +++ b/sw/source/filter/html/wrthtml.hxx @@ -287,7 +287,7 @@ public: SwHTMLFormatInfos m_CharFormatInfos; SwHTMLFormatInfos m_TextCollInfos; std::vector<SwFormatINetFormat*> m_aINetFormats; // the "open" INet attributes - std::vector<SwTextFootnote*> *m_pFootEndNotes; + std::unique_ptr<std::vector<SwTextFootnote*>> m_pFootEndNotes; OUString m_aCSS1Selector; // style selector OUString m_aNonConvertableCharacters; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits