[Libreoffice-commits] core.git: toolkit/inc toolkit/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Wed Aug 4 12:23:05 UTC 2021
toolkit/inc/awt/vclxpointer.hxx | 6 ++----
toolkit/source/awt/vclxpointer.cxx | 4 ++--
2 files changed, 4 insertions(+), 6 deletions(-)
New commits:
commit 71b3d7392bd3d0871c7383748d49ae5d46c80e51
Author: Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Tue Aug 3 21:27:41 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Aug 4 14:22:31 2021 +0200
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 at collabora.co.uk>
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);
}
More information about the Libreoffice-commits
mailing list