diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-02-21 16:00:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-02-22 12:27:55 +0100 |
commit | 27352b81638f2f1e792ab48ec532eaacf6f61718 (patch) | |
tree | eb744c30643272b219d59f2782ffc96f62bf379c /dbaccess | |
parent | 6ccdd0d164b16da9a13ab5d8290a1a0f041caaf7 (diff) |
Add XWeak constructor and operator= to uno::WeakReference
which is faster since we can skip the UNO_QUERY.
Change-Id: Id95ad9f3568213e974bd13659d92d4ea94dbfbd6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130282
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/RowSet.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/api/statement.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index d22717c263b0..9de8f00537c3 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -2071,7 +2071,7 @@ Reference< XResultSet > SAL_CALL ORowSet::createResultSet( ) if(m_xStatement.is()) { rtl::Reference<ORowSetClone> pClone = new ORowSetClone( m_aContext, *this, m_pMutex ); - m_aClones.emplace_back(static_cast<cppu::OWeakObject*>(pClone.get())); + m_aClones.emplace_back(css::uno::Reference< css::uno::XWeak >(pClone)); return pClone; } return Reference< XResultSet >(); diff --git a/dbaccess/source/core/api/statement.cxx b/dbaccess/source/core/api/statement.cxx index 3a466cff7d5f..3a67cbaebc7a 100644 --- a/dbaccess/source/core/api/statement.cxx +++ b/dbaccess/source/core/api/statement.cxx @@ -124,7 +124,7 @@ void OStatementBase::disposeResultSet() Reference< XComponent > xComp(m_aResultSet.get(), UNO_QUERY); if (xComp.is()) xComp->dispose(); - m_aResultSet = nullptr; + m_aResultSet.clear(); } // OComponentHelper |