diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-30 15:06:26 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-31 10:10:36 +0200 |
commit | d78d98e62255238d4ae6060b2a57ae37dbabb4e6 (patch) | |
tree | ce53d9f7b7f81159ab46406a202dd04dbfa4660b /svl | |
parent | d088493a47654e7f6239e8743bd8b2382754212a (diff) |
osl::Mutex->std::mutex in ItemHolder2
Change-Id: I6e21d6b8b582d4793f64b04183edcfcb3b178f1a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119722
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/config/itemholder2.cxx | 5 | ||||
-rw-r--r-- | svl/source/config/itemholder2.hxx | 7 |
2 files changed, 6 insertions, 6 deletions
diff --git a/svl/source/config/itemholder2.cxx b/svl/source/config/itemholder2.cxx index 6227ce390b45..4bcbe13c5c7c 100644 --- a/svl/source/config/itemholder2.cxx +++ b/svl/source/config/itemholder2.cxx @@ -31,7 +31,6 @@ #include <unotools/options.hxx> ItemHolder2::ItemHolder2() - : ItemHolderMutexBase() { try { @@ -76,7 +75,7 @@ void SAL_CALL ItemHolder2::disposing(const css::lang::EventObject&) void ItemHolder2::impl_addItem(EItem eItem) { - osl::MutexGuard aLock(m_aLock); + std::lock_guard aLock(m_aLock); for ( auto const & rInfo : m_lItems ) { @@ -95,7 +94,7 @@ void ItemHolder2::impl_releaseAllItems() { std::vector< TItemInfo > items; { - ::osl::MutexGuard aLock(m_aLock); + std::lock_guard aLock(m_aLock); items.swap(m_lItems); } diff --git a/svl/source/config/itemholder2.hxx b/svl/source/config/itemholder2.hxx index 27d9f182ff03..cdb72581e715 100644 --- a/svl/source/config/itemholder2.hxx +++ b/svl/source/config/itemholder2.hxx @@ -23,13 +23,14 @@ #include <unotools/itemholderbase.hxx> #include <cppuhelper/implbase.hxx> #include <com/sun/star/lang/XEventListener.hpp> +#include <mutex> -class ItemHolder2 : private ItemHolderMutexBase - , public ::cppu::WeakImplHelper< css::lang::XEventListener > +class ItemHolder2 : public ::cppu::WeakImplHelper< css::lang::XEventListener > { // member - private: +private: + std::mutex m_aLock; std::vector<TItemInfo> m_lItems; // c++ interface |