diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2020-03-17 21:34:21 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-03-18 09:49:50 +0100 |
commit | e5230535877e30c3b874495e8794faa3a42d8017 (patch) | |
tree | 6678613797f3cfa80a08455a4080ce9e653f9781 /connectivity/source/drivers/macab | |
parent | 673728c9caf7b3199dd684f48a32a0f5cafd6285 (diff) |
simplify ORefVector code
by making it extend std::vector - it wants to be a ref-counted vector,
so let it be, and we can simplify the usage sites
Change-Id: I93ff6ee1522da965e16223dca171401d36fd67b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90664
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/source/drivers/macab')
-rw-r--r-- | connectivity/source/drivers/macab/MacabPreparedStatement.cxx | 14 | ||||
-rw-r--r-- | connectivity/source/drivers/macab/MacabResultSetMetaData.cxx | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/connectivity/source/drivers/macab/MacabPreparedStatement.cxx b/connectivity/source/drivers/macab/MacabPreparedStatement.cxx index 102dcae458c9..cbb3dc75608c 100644 --- a/connectivity/source/drivers/macab/MacabPreparedStatement.cxx +++ b/connectivity/source/drivers/macab/MacabPreparedStatement.cxx @@ -42,8 +42,8 @@ void MacabPreparedStatement::checkAndResizeParameters(sal_Int32 nParams) if (nParams < 1) ::dbtools::throwInvalidIndexException(*this); - if (nParams >= static_cast<sal_Int32>(m_aParameterRow->get().size())) - m_aParameterRow->get().resize(nParams); + if (nParams >= static_cast<sal_Int32>(m_aParameterRow->size())) + m_aParameterRow->resize(nParams); } void MacabPreparedStatement::setMacabFields() const @@ -69,7 +69,7 @@ void MacabPreparedStatement::resetParameters() const void MacabPreparedStatement::getNextParameter(OUString &rParameter) const { - if (m_nParameterIndex >= static_cast<sal_Int32>(m_aParameterRow->get().size())) + if (m_nParameterIndex >= static_cast<sal_Int32>(m_aParameterRow->size())) { ::connectivity::SharedResources aResources; const OUString sError( aResources.getResourceString( @@ -78,7 +78,7 @@ void MacabPreparedStatement::getNextParameter(OUString &rParameter) const ::dbtools::throwGenericSQLException(sError,*const_cast<MacabPreparedStatement *>(this)); } - rParameter = (m_aParameterRow->get())[m_nParameterIndex]; + rParameter = (*m_aParameterRow)[m_nParameterIndex]; m_nParameterIndex++; } @@ -105,7 +105,7 @@ void MacabPreparedStatement::disposing() if (m_aParameterRow.is()) { - m_aParameterRow->get().clear(); + m_aParameterRow->clear(); m_aParameterRow = nullptr; } } @@ -197,7 +197,7 @@ void SAL_CALL MacabPreparedStatement::setNull(sal_Int32 parameterIndex, sal_Int3 checkAndResizeParameters(parameterIndex); - (m_aParameterRow->get())[parameterIndex - 1].setNull(); + (*m_aParameterRow)[parameterIndex - 1].setNull(); } void SAL_CALL MacabPreparedStatement::setObjectNull(sal_Int32, sal_Int32, const OUString&) @@ -247,7 +247,7 @@ void SAL_CALL MacabPreparedStatement::setString(sal_Int32 parameterIndex, const checkAndResizeParameters(parameterIndex); - (m_aParameterRow->get())[parameterIndex - 1] = x; + (*m_aParameterRow)[parameterIndex - 1] = x; } void SAL_CALL MacabPreparedStatement::setBytes(sal_Int32, const Sequence< sal_Int8 >&) diff --git a/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx b/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx index e5a851d69dd2..38e7dca051d4 100644 --- a/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx +++ b/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx @@ -57,7 +57,7 @@ void MacabResultSetMetaData::setMacabFields(const ::rtl::Reference<connectivity: aHeader = aRecords->getHeader(); - for (const auto& rxColumn : xColumns->get()) + for (const auto& rxColumn : *xColumns) { OUString aFieldName; sal_uInt32 nFieldNumber; |