[Libreoffice-commits] core.git: connectivity/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Wed Mar 3 07:50:53 UTC 2021
connectivity/source/drivers/ado/ADriver.cxx | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
New commits:
commit d203cf7ee45b54bd505704dc798ff04b5dac1592
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Mar 2 10:52:47 2021 +0100
Commit: Stephan Bergmann <sbergman at 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 <sbergman at 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 )
More information about the Libreoffice-commits
mailing list