diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-02-01 16:00:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-02-02 07:00:14 +0000 |
commit | 90ff8cc432fd043ed662d478f7ace49438d00ff3 (patch) | |
tree | f334f3ca050b32f3a90c4db354b3cab7388b4760 /configmgr | |
parent | 63b4126116ee0c92f8dbf2b54a2afacf8eed74cf (diff) |
osl::Mutex->std::mutex in configmgr::read_only_access::Service
Change-Id: Ia92bb76cedb45d2c28482d34869e239cfdd32ebf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146470
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'configmgr')
-rw-r--r-- | configmgr/source/readonlyaccess.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/configmgr/source/readonlyaccess.cxx b/configmgr/source/readonlyaccess.cxx index 76ec606d5bc4..71649bc08822 100644 --- a/configmgr/source/readonlyaccess.cxx +++ b/configmgr/source/readonlyaccess.cxx @@ -22,7 +22,6 @@ #include <cppuhelper/implbase.hxx> #include <cppuhelper/supportsservice.hxx> #include <cppuhelper/weak.hxx> -#include <osl/mutex.hxx> #include <rtl/ref.hxx> #include <rtl/ustring.hxx> #include <utility> @@ -31,6 +30,7 @@ #include "components.hxx" #include "lock.hxx" #include "rootaccess.hxx" +#include <mutex> namespace configmgr::read_only_access { @@ -76,7 +76,7 @@ private: css::uno::Reference< css::uno::XComponentContext > context_; - osl::Mutex mutex_; + std::mutex mutex_; rtl::Reference< RootAccess > root_; }; @@ -88,7 +88,7 @@ void Service::initialize(css::uno::Sequence< css::uno::Any > const & aArguments) "not exactly one string argument", static_cast< cppu::OWeakObject * >(this), -1); } - osl::MutexGuard g1(mutex_); + std::unique_lock g1(mutex_); if (root_.is()) { throw css::uno::RuntimeException( "already initialized", static_cast< cppu::OWeakObject * >(this)); @@ -100,7 +100,7 @@ void Service::initialize(css::uno::Sequence< css::uno::Any > const & aArguments) } rtl::Reference< RootAccess > Service::getRoot() { - osl::MutexGuard g(mutex_); + std::unique_lock g(mutex_); if (!root_.is()) { throw css::lang::NotInitializedException( "not initialized", static_cast< cppu::OWeakObject * >(this)); |