diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-08-03 21:27:41 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-04 14:22:31 +0200 |
commit | 71b3d7392bd3d0871c7383748d49ae5d46c80e51 (patch) | |
tree | e211ee863f58eca5359199e18a84f3507558d396 /toolkit | |
parent | 36efb384a66b6dd645e0ae80fd7df68370a9dc8b (diff) |
osl::Mutex->std::mutex in VCLXPointer
Change-Id: If96f20d8ce8c893ece59e9278aa79dd1a8f8223f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119953
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/inc/awt/vclxpointer.hxx | 6 | ||||
-rw-r--r-- | toolkit/source/awt/vclxpointer.cxx | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/toolkit/inc/awt/vclxpointer.hxx b/toolkit/inc/awt/vclxpointer.hxx index e1dabd2abe54..3bfcceeabf0a 100644 --- a/toolkit/inc/awt/vclxpointer.hxx +++ b/toolkit/inc/awt/vclxpointer.hxx @@ -25,7 +25,7 @@ #include <com/sun/star/lang/XUnoTunnel.hpp> #include <comphelper/servicehelper.hxx> #include <cppuhelper/implbase.hxx> -#include <osl/mutex.hxx> +#include <mutex> #include <vcl/ptrstyle.hxx> @@ -35,11 +35,9 @@ class VCLXPointer final : public cppu::WeakImplHelper< css::awt::XPointer, css::lang::XUnoTunnel, css::lang::XServiceInfo> { - ::osl::Mutex maMutex; + std::mutex maMutex; PointerStyle maPointer; - ::osl::Mutex& GetMutex() { return maMutex; } - public: VCLXPointer(); virtual ~VCLXPointer() override; diff --git a/toolkit/source/awt/vclxpointer.cxx b/toolkit/source/awt/vclxpointer.cxx index 2d382f5c5350..89828e48a611 100644 --- a/toolkit/source/awt/vclxpointer.cxx +++ b/toolkit/source/awt/vclxpointer.cxx @@ -34,14 +34,14 @@ UNO3_GETIMPLEMENTATION_IMPL( VCLXPointer ); void VCLXPointer::setType( sal_Int32 nType ) { - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); + std::scoped_lock aGuard( maMutex ); maPointer = static_cast<PointerStyle>(nType); } sal_Int32 VCLXPointer::getType() { - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); + std::scoped_lock aGuard( maMutex ); return static_cast<sal_Int32>(maPointer); } |