xmloff/source/draw/shapeexport.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 102e5ecb4b7fb5487077274f7eefdb2160119c59 Author: Tor Lillqvist <[email protected]> Date: Thu May 4 15:09:25 2017 +0300 loplugin:useuniqueptr Warning fires in the --disable-gltf case. Change-Id: I9f0fb15f581dbbe0e9ba68789ed5a1cd1a9b28d2 Reviewed-on: https://gerrit.libreoffice.org/37235 Tested-by: Jenkins <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 059dfa2d6567..93584d1c8f1c 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -86,6 +86,7 @@ #include <comphelper/storagehelper.hxx> #include <o3tl/any.hxx> +#include <o3tl/make_unique.hxx> #include <o3tl/typed_flags_set.hxx> #include <rtl/math.hxx> @@ -3346,7 +3347,7 @@ void XMLShapeExport::ImpExportMediaShape( mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_MIME_TYPE, sMimeType ); // write plugin - SvXMLElementExport* pPluginOBJ = new SvXMLElementExport(mrExport, XML_NAMESPACE_DRAW, XML_PLUGIN, !( nFeatures & XMLShapeExportFlags::NO_WS ), true); + auto pPluginOBJ = o3tl::make_unique<SvXMLElementExport>(mrExport, XML_NAMESPACE_DRAW, XML_PLUGIN, !( nFeatures & XMLShapeExportFlags::NO_WS ), true); // export parameters const OUString aFalseStr( "false" ), aTrueStr( "true" ); @@ -3398,7 +3399,6 @@ void XMLShapeExport::ImpExportMediaShape( delete( new SvXMLElementExport( mrExport, XML_NAMESPACE_DRAW, XML_PARAM, false, true ) ); } - delete pPluginOBJ; #if HAVE_FEATURE_GLTF if( sMimeType == "model/vnd.gltf+json" ) lcl_StoreGltfFallback(GetExport(), xPropSet, aMediaURL); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
