summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/ado/AConnection.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-03-09 09:54:16 +0100
committerStephan Bergmann <sbergman@redhat.com>2021-03-09 14:23:45 +0100
commitbbcf235753dc87ef6bc6652a77239513110e2d9e (patch)
tree0636b306f11ec31554ff4618547230de9c877977 /connectivity/source/drivers/ado/AConnection.cxx
parent5e8c0e2556eebfee7b2d75403cbf5cee6642e644 (diff)
loplugin:refcounting (clang-cl)
Change-Id: I91189ebd902b70e2fbe42fe8cc09b8677af1a5fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112194 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'connectivity/source/drivers/ado/AConnection.cxx')
-rw-r--r--connectivity/source/drivers/ado/AConnection.cxx17
1 files changed, 7 insertions, 10 deletions
diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx
index 6a26265c4d42..664990f66564 100644
--- a/connectivity/source/drivers/ado/AConnection.cxx
+++ b/connectivity/source/drivers/ado/AConnection.cxx
@@ -163,10 +163,9 @@ Reference< XStatement > SAL_CALL OConnection::createStatement( )
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OConnection_BASE::rBHelper.bDisposed);
- OStatement* pStmt = new OStatement(this);
- Reference< XStatement > xStmt = pStmt;
- m_aStatements.push_back(WeakReferenceHelper(*pStmt));
- return pStmt;
+ Reference< XStatement > xStmt = new OStatement(this);
+ m_aStatements.push_back(WeakReferenceHelper(xStmt));
+ return xStmt;
}
Reference< XPreparedStatement > SAL_CALL OConnection::prepareStatement( const OUString& sql )
@@ -175,9 +174,8 @@ Reference< XPreparedStatement > SAL_CALL OConnection::prepareStatement( const OU
checkDisposed(OConnection_BASE::rBHelper.bDisposed);
- OPreparedStatement* pStmt = new OPreparedStatement(this, sql);
- Reference< XPreparedStatement > xPStmt = pStmt;
- m_aStatements.push_back(WeakReferenceHelper(*pStmt));
+ Reference< XPreparedStatement > xPStmt = new OPreparedStatement(this, sql);
+ m_aStatements.push_back(WeakReferenceHelper(xPStmt));
return xPStmt;
}
@@ -187,9 +185,8 @@ Reference< XPreparedStatement > SAL_CALL OConnection::prepareCall( const OUStrin
checkDisposed(OConnection_BASE::rBHelper.bDisposed);
- OCallableStatement* pStmt = new OCallableStatement(this, sql);
- Reference< XPreparedStatement > xPStmt = pStmt;
- m_aStatements.push_back(WeakReferenceHelper(*pStmt));
+ Reference< XPreparedStatement > xPStmt = new OCallableStatement(this, sql);
+ m_aStatements.push_back(WeakReferenceHelper(xPStmt));
return xPStmt;
}