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 /svtools/source | |
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 'svtools/source')
-rw-r--r-- | svtools/source/config/itemholder2.cxx | 5 | ||||
-rw-r--r-- | svtools/source/config/itemholder2.hxx | 6 |
2 files changed, 5 insertions, 6 deletions
diff --git a/svtools/source/config/itemholder2.cxx b/svtools/source/config/itemholder2.cxx index 92d3226b8e1c..396a90322a65 100644 --- a/svtools/source/config/itemholder2.cxx +++ b/svtools/source/config/itemholder2.cxx @@ -36,7 +36,6 @@ namespace svtools { ItemHolder2::ItemHolder2() - : ItemHolderMutexBase() { try { @@ -87,7 +86,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 ) { @@ -107,7 +106,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/svtools/source/config/itemholder2.hxx b/svtools/source/config/itemholder2.hxx index c4fd540cf2d3..3bb1a6871ba7 100644 --- a/svtools/source/config/itemholder2.hxx +++ b/svtools/source/config/itemholder2.hxx @@ -22,17 +22,17 @@ #include <unotools/itemholderbase.hxx> #include <cppuhelper/implbase.hxx> #include <com/sun/star/lang/XEventListener.hpp> +#include <mutex> namespace svtools { -class ItemHolder2 : private ItemHolderMutexBase - , public ::cppu::WeakImplHelper< css::lang::XEventListener > +class ItemHolder2 : public ::cppu::WeakImplHelper< css::lang::XEventListener > { // member private: - + std::mutex m_aLock; std::vector<TItemInfo> m_lItems; |