ucb/source/ucp/file/filrow.cxx | 4 ++-- ucb/source/ucp/file/filrow.hxx | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-)
New commits: commit e05e05d26ea1421c919a789c9c1afd393e0c19b2 Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Wed Aug 4 21:34:03 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Aug 5 15:06:55 2021 +0200 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.gran...@collabora.co.uk> 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;