From b0631cc1454d99cbaa948e54c3b0c246bd27bf1c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 25 Apr 2018 10:52:46 +0200 Subject: loplugin:useuniqueptr in XMLTextParagraphExport Change-Id: I753bbfc60172a36e1f3ba08398dc17ee14e0c551 Reviewed-on: https://gerrit.libreoffice.org/53604 Tested-by: Jenkins Reviewed-by: Noel Grandin --- xmloff/source/text/txtparae.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'xmloff/source') diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 2e7349780ed2..36c161abc79c 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -3844,18 +3844,17 @@ void XMLTextParagraphExport::PreventExportOfControlsInMuteSections( void XMLTextParagraphExport::PushNewTextListsHelper() { - mpTextListsHelper = new XMLTextListsHelper(); - maTextListsHelperStack.push_back( mpTextListsHelper ); + maTextListsHelperStack.emplace_back( new XMLTextListsHelper() ); + mpTextListsHelper = maTextListsHelperStack.back().get(); } void XMLTextParagraphExport::PopTextListsHelper() { - delete mpTextListsHelper; mpTextListsHelper = nullptr; maTextListsHelperStack.pop_back(); if ( !maTextListsHelperStack.empty() ) { - mpTextListsHelper = maTextListsHelperStack.back(); + mpTextListsHelper = maTextListsHelperStack.back().get(); } } -- cgit