diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-08-05 20:31:31 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-06 08:58:34 +0200 |
commit | cc6701f9e58f4b655313fa75da8980bb93ae545e (patch) | |
tree | 5bcca463b22003abc0e6eab16075b609d2719cf9 /ucb/source/ucp | |
parent | 1dd1cf97392f336c05ea76ccda273bb15f2e0b4e (diff) |
osl::Mutex->std::mutex in ParentStorageHolder
Change-Id: I01cd21cddc10b09ea8026e84fa64331067b38db0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120086
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb/source/ucp')
-rw-r--r-- | ucb/source/ucp/tdoc/tdoc_stgelems.hxx | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/ucb/source/ucp/tdoc/tdoc_stgelems.hxx b/ucb/source/ucp/tdoc/tdoc_stgelems.hxx index eda5390f07b6..f6e8f609e025 100644 --- a/ucb/source/ucp/tdoc/tdoc_stgelems.hxx +++ b/ucb/source/ucp/tdoc/tdoc_stgelems.hxx @@ -19,9 +19,6 @@ #pragma once -#include <memory> - -#include <osl/mutex.hxx> #include <rtl/ref.hxx> #include <cppuhelper/implbase.hxx> @@ -36,15 +33,12 @@ #include "tdoc_storage.hxx" -namespace tdoc_ucp { - -struct MutexHolder -{ - osl::Mutex m_aMutex; -}; +#include <memory> +#include <mutex> +namespace tdoc_ucp { -class ParentStorageHolder : public MutexHolder +class ParentStorageHolder { public: ParentStorageHolder( @@ -57,9 +51,13 @@ public: getParentStorage() const { return m_xParentStorage; } void setParentStorage( const css::uno::Reference< css::embed::XStorage > & xStg ) - { osl::MutexGuard aGuard( m_aMutex ); m_xParentStorage = xStg; } + { + std::scoped_lock aGuard( m_aMutex ); + m_xParentStorage = xStg; + } private: + std::mutex m_aMutex; css::uno::Reference< css::embed::XStorage > m_xParentStorage; bool m_bParentIsRootStorage; }; |