connectivity/source/drivers/ado/ADriver.cxx |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

New commits:
commit d203cf7ee45b54bd505704dc798ff04b5dac1592
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Tue Mar 2 10:52:47 2021 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Wed Mar 3 08:50:10 2021 +0100

    loplugin:refcounting (clang-cl)
    
    Change-Id: I400ef428921573ae345de15e94695e98f0b02a92
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111813
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

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 <connectivity/dbexception.hxx>
 #include <cppuhelper/supportsservice.hxx>
 #include <o3tl/safeCoInitUninit.hxx>
+#include <rtl/ref.hxx>
 #include <strings.hrc>
 #include <objbase.h>
 
 #include <resource/sharedresources.hxx>
 
-#include <memory>
-
 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<OConnection> pCon(new OConnection(this));
+    rtl::Reference<OConnection> 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 )
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to