summaryrefslogtreecommitdiff
path: root/desktop/source/app
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 /desktop/source/app
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 'desktop/source/app')
-rw-r--r--desktop/source/app/dispatchwatcher.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx
index 872d98333982..5393b07e130d 100644
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -406,7 +406,7 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest
if( xDispatcher.is() )
{
{
- ::osl::ClearableMutexGuard aGuard(m_mutex);
+ osl::MutexGuard aGuard(m_mutex);
// Remember request so we can find it in statusChanged!
m_nRequestCount++;
}
@@ -754,9 +754,10 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest
xDisp->dispatchWithNotification( aDispatche.aURL, aArgs, this );
else
{
- ::osl::ClearableMutexGuard aGuard(m_mutex);
- m_nRequestCount--;
- aGuard.clear();
+ {
+ osl::MutexGuard aGuard(m_mutex);
+ m_nRequestCount--;
+ }
xDispatch->dispatch( aDispatche.aURL, aArgs );
}
}