diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-08-04 21:34:03 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-05 15:06:55 +0200 |
commit | e05e05d26ea1421c919a789c9c1afd393e0c19b2 (patch) | |
tree | 85e10cbbe8434dbebec3a0ccac6a42bf3675922e /ucb/source | |
parent | 5d5bea3a816794cf176ffee582b9f19684ad745e (diff) |
osl::Mutex->std::mutex in fileaccess:XRow_impl
Change-Id: I197c35b8405db418870354b0d0791dad6d5ea6d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120024
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb/source')
-rw-r--r-- | ucb/source/ucp/file/filrow.cxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/file/filrow.hxx | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/ucb/source/ucp/file/filrow.cxx b/ucb/source/ucp/file/filrow.cxx index 54ba6140f040..e5957d5afee3 100644 --- a/ucb/source/ucp/file/filrow.cxx +++ b/ucb/source/ucp/file/filrow.cxx @@ -232,7 +232,7 @@ XRow_impl::getObject( { if( isIndexOutOfBounds( columnIndex ) ) throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface >(), OUString(), 0, uno::Any() ); - osl::MutexGuard aGuard( m_aMutex ); + std::scoped_lock aGuard( m_aMutex ); uno::Any Value = m_aValueMap[columnIndex - 1]; m_nWasNull = !Value.hasValue(); return Value; @@ -285,7 +285,7 @@ template<typename T> T XRow_impl::getValue(sal_Int32 columnIndex) { T aValue{}; - osl::MutexGuard aGuard( m_aMutex ); + std::scoped_lock aGuard( m_aMutex ); m_nWasNull = ::convert<T>( m_pMyShell, m_xTypeConverter, m_aValueMap[ --columnIndex ], aValue ); return aValue; } diff --git a/ucb/source/ucp/file/filrow.hxx b/ucb/source/ucp/file/filrow.hxx index 1210bdf142e5..dbaf7c837787 100644 --- a/ucb/source/ucp/file/filrow.hxx +++ b/ucb/source/ucp/file/filrow.hxx @@ -21,6 +21,7 @@ #include <com/sun/star/sdbc/XRow.hpp> #include <com/sun/star/script/XTypeConverter.hpp> #include <cppuhelper/implbase.hxx> +#include <mutex> namespace fileaccess { @@ -97,7 +98,7 @@ namespace fileaccess { getArray( sal_Int32 columnIndex ) override; private: - osl::Mutex m_aMutex; + std::mutex m_aMutex; css::uno::Sequence< css::uno::Any > m_aValueMap; bool m_nWasNull; TaskManager* m_pMyShell; |