diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-08-01 18:49:14 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-01 22:18:33 +0200 |
commit | c0ce120b55ba389729e97babf80f2cb39ce38e9f (patch) | |
tree | 346534f19ca4c7ea03542ee88bc09dc33e7a2af1 /slideshow/source/engine | |
parent | ee57ac14739f6bb03b1fd2031f547859c578f7ec (diff) |
osl::Mutex->std::mutex in EventQueue
Change-Id: Ia936a28dd2ae5b5cb1797a0e703e9d96841a1f3a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119829
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'slideshow/source/engine')
-rw-r--r-- | slideshow/source/engine/eventqueue.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/slideshow/source/engine/eventqueue.cxx b/slideshow/source/engine/eventqueue.cxx index 6094fa43bf89..0e888db85567 100644 --- a/slideshow/source/engine/eventqueue.cxx +++ b/slideshow/source/engine/eventqueue.cxx @@ -77,7 +77,7 @@ namespace slideshow::internal bool EventQueue::addEvent( const EventSharedPtr& rEvent ) { - ::osl::MutexGuard aGuard( maMutex ); + std::lock_guard aGuard( maMutex ); SAL_INFO("slideshow.eventqueue", "adding event \"" << rEvent->GetDescription() << "\" [" << rEvent.get() @@ -103,7 +103,7 @@ namespace slideshow::internal bool EventQueue::addEventForNextRound( EventSharedPtr const& rEvent ) { - ::osl::MutexGuard aGuard( maMutex ); + std::lock_guard aGuard( maMutex ); SAL_INFO("slideshow.eventqueue", "adding event \"" << rEvent->GetDescription() << "\" [" << rEvent.get() @@ -120,7 +120,7 @@ namespace slideshow::internal bool EventQueue::addEventWhenQueueIsEmpty (const EventSharedPtr& rpEvent) { - ::osl::MutexGuard aGuard( maMutex ); + std::lock_guard aGuard( maMutex ); SAL_INFO("slideshow.eventqueue", "adding event \"" << rpEvent->GetDescription() << "\" [" << rpEvent.get() @@ -140,14 +140,14 @@ namespace slideshow::internal void EventQueue::forceEmpty() { - ::osl::MutexGuard aGuard( maMutex ); + std::lock_guard aGuard( maMutex ); process_(true); } void EventQueue::process() { - ::osl::MutexGuard aGuard( maMutex ); + std::lock_guard aGuard( maMutex ); process_(false); } @@ -257,14 +257,14 @@ namespace slideshow::internal bool EventQueue::isEmpty() const { - ::osl::MutexGuard aGuard( maMutex ); + std::lock_guard aGuard( maMutex ); return maEvents.empty() && maNextEvents.empty() && maNextNextEvents.empty(); } double EventQueue::nextTimeout() const { - ::osl::MutexGuard aGuard( maMutex ); + std::lock_guard aGuard( maMutex ); // return time for next entry (if any) double nTimeout (::std::numeric_limits<double>::max()); @@ -281,7 +281,7 @@ namespace slideshow::internal void EventQueue::clear() { - ::osl::MutexGuard aGuard( maMutex ); + std::lock_guard aGuard( maMutex ); // TODO(P1): Maybe a plain vector and vector.swap will // be faster here. Profile. |