From d203cf7ee45b54bd505704dc798ff04b5dac1592 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 2 Mar 2021 10:52:47 +0100 Subject: loplugin:refcounting (clang-cl) Change-Id: I400ef428921573ae345de15e94695e98f0b02a92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111813 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- connectivity/source/drivers/ado/ADriver.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/connectivity/source/drivers/ado/ADriver.cxx b/connectivity/source/drivers/ado/ADriver.cxx index 6940c7ea6ecd..610f7722c697 100644 --- a/connectivity/source/drivers/ado/ADriver.cxx +++ b/connectivity/source/drivers/ado/ADriver.cxx @@ -27,13 +27,12 @@ #include #include #include +#include #include #include #include -#include - using namespace connectivity; using namespace connectivity::ado; using namespace com::sun::star::uno; @@ -94,13 +93,12 @@ Reference< XConnection > SAL_CALL ODriver::connect( const OUString& url, const S return nullptr; // we need to wrap the connection as the construct call might throw - std::unique_ptr pCon(new OConnection(this)); + rtl::Reference pCon(new OConnection(this)); pCon->construct(url,info); OConnection* pPtr = pCon.get(); - Reference< XConnection > xCon = pCon.release(); m_xConnections.push_back(WeakReferenceHelper(*pPtr)); - return xCon; + return pCon; } sal_Bool SAL_CALL ODriver::acceptsURL( const OUString& url ) -- cgit