diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-31 18:50:43 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-02 12:17:07 +0200 |
commit | 287680683ca266f1fb4f447ac9bdaf76669d559d (patch) | |
tree | 58535e78394367cbdc95d0ce06f38c3702fd45ed | |
parent | c1f16d3882c60f4a9ffccfc69003e09f19b99abe (diff) |
osl::Mutex->std::mutex in ScRefreshTimer
Change-Id: I64cac28e15edc90a8456e99c22e78cc84750eebd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119747
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sc/inc/refreshtimer.hxx | 6 | ||||
-rw-r--r-- | sc/source/core/tool/refreshtimer.cxx | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sc/inc/refreshtimer.hxx b/sc/inc/refreshtimer.hxx index 395ea9198abc..9582d1b19a2c 100644 --- a/sc/inc/refreshtimer.hxx +++ b/sc/inc/refreshtimer.hxx @@ -23,20 +23,20 @@ #include <tools/solar.h> #include <vcl/timer.hxx> -#include <osl/mutex.hxx> #include "scdllapi.h" #include <memory> +#include <mutex> class ScRefreshTimerControl { - ::osl::Mutex aMutex; + std::mutex aMutex; sal_uInt16 nBlockRefresh; public: ScRefreshTimerControl() : nBlockRefresh(0) {} void SetAllowRefresh( bool b ); bool IsRefreshAllowed() const { return !nBlockRefresh; } - ::osl::Mutex& GetMutex() { return aMutex; } + std::mutex& GetMutex() { return aMutex; } }; class ScRefreshTimer : public AutoTimer diff --git a/sc/source/core/tool/refreshtimer.cxx b/sc/source/core/tool/refreshtimer.cxx index c466febcee24..35c8eace9b40 100644 --- a/sc/source/core/tool/refreshtimer.cxx +++ b/sc/source/core/tool/refreshtimer.cxx @@ -36,7 +36,7 @@ ScRefreshTimerProtector::ScRefreshTimerProtector( std::unique_ptr<ScRefreshTimer { m_rpControl->SetAllowRefresh( false ); // wait for any running refresh in another thread to finish - ::osl::MutexGuard aGuard( m_rpControl->GetMutex() ); + std::lock_guard aGuard( m_rpControl->GetMutex() ); } } @@ -122,7 +122,7 @@ void ScRefreshTimer::Invoke() if ( ppControl && *ppControl && (*ppControl)->IsRefreshAllowed() ) { // now we COULD make the call in another thread ... - ::osl::MutexGuard aGuard( (*ppControl)->GetMutex() ); + std::lock_guard aGuard( (*ppControl)->GetMutex() ); Timer::Invoke(); // restart from now on, don't execute immediately again if timed out // a second time during refresh |