summaryrefslogtreecommitdiff
path: root/unotools/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-07-30 15:04:50 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-07-31 10:02:31 +0200
commitd088493a47654e7f6239e8743bd8b2382754212a (patch)
tree8a005e1a95aef9e28910e05849ff8c5f75be4e51 /unotools/source
parentc636f233fc0cd4f7c9000901fd006aa7823ade55 (diff)
osl::Mutex->std::mutex in ItemHolder1
Change-Id: I778450e986ec93f020ef594fe79bc65673ae78be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119714 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools/source')
-rw-r--r--unotools/source/config/itemholder1.cxx5
-rw-r--r--unotools/source/config/itemholder1.hxx5
2 files changed, 5 insertions, 5 deletions
diff --git a/unotools/source/config/itemholder1.cxx b/unotools/source/config/itemholder1.cxx
index f56e88cb0b2f..7870e63ae888 100644
--- a/unotools/source/config/itemholder1.cxx
+++ b/unotools/source/config/itemholder1.cxx
@@ -43,7 +43,6 @@
#include <tools/diagnose_ex.h>
ItemHolder1::ItemHolder1()
- : ItemHolderMutexBase()
{
try
{
@@ -87,7 +86,7 @@ void SAL_CALL ItemHolder1::disposing(const css::lang::EventObject&)
void ItemHolder1::impl_addItem(EItem eItem)
{
- osl::MutexGuard aLock(m_aLock);
+ std::lock_guard aLock(m_aLock);
for ( auto const & rInfo : m_lItems )
{
@@ -106,7 +105,7 @@ void ItemHolder1::impl_releaseAllItems()
{
std::vector< TItemInfo > items;
{
- ::osl::MutexGuard aLock(m_aLock);
+ std::lock_guard aLock(m_aLock);
items.swap(m_lItems);
}
diff --git a/unotools/source/config/itemholder1.hxx b/unotools/source/config/itemholder1.hxx
index 8762938e968d..8e61bb55185b 100644
--- a/unotools/source/config/itemholder1.hxx
+++ b/unotools/source/config/itemholder1.hxx
@@ -22,14 +22,15 @@
#include <unotools/itemholderbase.hxx>
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/lang/XEventListener.hpp>
+#include <mutex>
-class ItemHolder1 : private ItemHolderMutexBase
- , public ::cppu::WeakImplHelper< css::lang::XEventListener >
+class ItemHolder1 : public ::cppu::WeakImplHelper< css::lang::XEventListener >
{
// member
private:
+ std::mutex m_aLock;
std::vector<TItemInfo> m_lItems;
// c++ interface