From ed8152b1ed9baf859966fd21d6641dfba9c4467c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 21 Apr 2020 07:51:25 +0200 Subject: improve loplugin:makeshared to find places where we are converting stuff to unique_ptr instead of using std::make_shared. As a bonus, this tends to find places where we are using shared_ptr where we can instead be using unique_ptr avoiding the locking overhead. Change-Id: I1b57bbc4a6c766b48bba8e25a55161800e149f62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93207 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sfx2/qa/cppunit/test_misc.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sfx2/qa/cppunit') diff --git a/sfx2/qa/cppunit/test_misc.cxx b/sfx2/qa/cppunit/test_misc.cxx index 587cec0047fe..f616b3e8cea2 100644 --- a/sfx2/qa/cppunit/test_misc.cxx +++ b/sfx2/qa/cppunit/test_misc.cxx @@ -87,7 +87,7 @@ CPPUNIT_TEST_FIXTURE(MiscTest, testODFCustomMetadata) uno::Reference const xZip( packages::zip::ZipFileAccess::createWithURL(m_xContext, aTempFile.GetURL())); uno::Reference const xInputStream(xZip->getByName("meta.xml"), uno::UNO_QUERY); - std::shared_ptr const pStream(utl::UcbStreamHelper::CreateStream(xInputStream, true)); + std::unique_ptr const pStream(utl::UcbStreamHelper::CreateStream(xInputStream, true)); xmlDocPtr pXmlDoc = parseXmlStream(pStream.get()); assertXPathContent(pXmlDoc, "/office:document-meta/office:meta/bork", "bork"); assertXPath(pXmlDoc, "/office:document-meta/office:meta/foo:bar", 1); -- cgit