summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-04-07 11:48:47 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-04-07 17:53:04 +0200
commit5a824268dfdd48c00f656b767b48cd12ccbdaabb (patch)
treea25f4afd3ca49cff41fc44559aedea70c82e6c7e /toolkit
parenta6186a678cd9f67359da885606b3c3983f6bdc74 (diff)
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 <mike.kaganski@collabora.com>
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/controls/unocontrols.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index 50b954452a30..937b05745273 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -2344,7 +2344,7 @@ void SAL_CALL UnoControlListBoxModel::setItemTextAndImage( ::sal_Int32 i_nPositi
void SAL_CALL UnoControlListBoxModel::setItemData( ::sal_Int32 i_nPosition, const Any& i_rDataValue )
{
- ::osl::ClearableMutexGuard aGuard( GetMutex() );
+ osl::MutexGuard aGuard( GetMutex() );
ListItem& rItem( m_xData->getItem( i_nPosition ) );
rItem.ItemData = i_rDataValue;
}
@@ -2376,7 +2376,7 @@ beans::Pair< OUString, OUString > SAL_CALL UnoControlListBoxModel::getItemTextAn
Any SAL_CALL UnoControlListBoxModel::getItemData( ::sal_Int32 i_nPosition )
{
- ::osl::ClearableMutexGuard aGuard( GetMutex() );
+ osl::MutexGuard aGuard( GetMutex() );
const ListItem& rItem( m_xData->getItem( i_nPosition ) );
return rItem.ItemData;
}