sd/source/console/PresenterTimer.cxx |    8 ++++----
 sd/source/console/PresenterTimer.hxx |    4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 3a1a303291ef5500932cac4981d910f9aebfb606
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Feb 21 12:45:10 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Feb 21 17:18:17 2023 +0000

    osl::Mutex->std::mutex in PresenterTimer
    
    Change-Id: Icd6b6268792119541761a5e94600d8bc9e183ed8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147400
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sd/source/console/PresenterTimer.cxx 
b/sd/source/console/PresenterTimer.cxx
index b9a4b62815c4..ed7be4cbc9c1 100644
--- a/sd/source/console/PresenterTimer.cxx
+++ b/sd/source/console/PresenterTimer.cxx
@@ -468,7 +468,7 @@ PresenterClockTimer::~PresenterClockTimer()
 
 void PresenterClockTimer::AddListener (const SharedListener& rListener)
 {
-    osl::MutexGuard aGuard (maMutex);
+    std::unique_lock aGuard (maMutex);
 
     maListeners.push_back(rListener);
 
@@ -485,7 +485,7 @@ void PresenterClockTimer::AddListener (const 
SharedListener& rListener)
 
 void PresenterClockTimer::RemoveListener (const SharedListener& rListener)
 {
-    osl::MutexGuard aGuard (maMutex);
+    std::unique_lock aGuard (maMutex);
 
     ListenerContainer::iterator iListener (::std::find(
         maListeners.begin(),
@@ -519,7 +519,7 @@ void PresenterClockTimer::CheckCurrentTime (const 
TimeValue& rCurrentTime)
     css::uno::Reference<css::awt::XRequestCallback> xRequestCallback;
     css::uno::Reference<css::awt::XCallback> xCallback;
     {
-        osl::MutexGuard aGuard (maMutex);
+        std::unique_lock aGuard (maMutex);
 
         TimeValue aCurrentTime (rCurrentTime);
         oslDateTime aDateTime;
@@ -554,7 +554,7 @@ void SAL_CALL PresenterClockTimer::notify (const 
css::uno::Any&)
     ListenerContainer aListenerCopy;
 
     {
-        osl::MutexGuard aGuard (maMutex);
+        std::unique_lock aGuard (maMutex);
 
         mbIsCallbackPending = false;
 
diff --git a/sd/source/console/PresenterTimer.hxx 
b/sd/source/console/PresenterTimer.hxx
index 1c2b6530b759..8cba60a22346 100644
--- a/sd/source/console/PresenterTimer.hxx
+++ b/sd/source/console/PresenterTimer.hxx
@@ -24,13 +24,13 @@
 #include <com/sun/star/awt/XRequestCallback.hpp>
 #include <cppuhelper/basemutex.hxx>
 #include <cppuhelper/compbase.hxx>
-#include <osl/mutex.hxx>
 #include <osl/time.h>
 #include <rtl/ref.hxx>
 #include <sal/types.h>
 
 #include <functional>
 #include <memory>
+#include <mutex>
 #include <vector>
 
 namespace com::sun::star::uno { class XComponentContext; }
@@ -99,7 +99,7 @@ public:
 private:
     static ::rtl::Reference<PresenterClockTimer> mpInstance;
 
-    ::osl::Mutex maMutex;
+    std::mutex maMutex;
     typedef ::std::vector<SharedListener> ListenerContainer;
     ListenerContainer maListeners;
     oslDateTime maDateTime;

Reply via email to