From 5a824268dfdd48c00f656b767b48cd12ccbdaabb Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Sun, 7 Apr 2019 11:48:47 +0300 Subject: Don't use resettable/clearable guard where plain guard is enough Also use scope where possible. This allows to limit guard scope at language level; visualises the scope clearly; and helps avoiding errors like fixed in commit 61e4437c857854b331fa01da6f39b2b3b58a800b. Change-Id: Ifeca96e2df8e8a0897770d9546b2536806275f41 Reviewed-on: https://gerrit.libreoffice.org/70376 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- unotools/source/config/itemholder1.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'unotools') diff --git a/unotools/source/config/itemholder1.cxx b/unotools/source/config/itemholder1.cxx index bf74770f34a2..3af5dbf1b302 100644 --- a/unotools/source/config/itemholder1.cxx +++ b/unotools/source/config/itemholder1.cxx @@ -95,7 +95,7 @@ void SAL_CALL ItemHolder1::disposing(const css::lang::EventObject&) void ItemHolder1::impl_addItem(EItem eItem) { - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); for ( auto const & rInfo : m_lItems ) { -- cgit