[Libreoffice-commits] core.git: include/vcl vcl/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Sat Jul 31 12:24:56 UTC 2021
include/vcl/transfer.hxx | 2 +-
vcl/source/treelist/transfer2.cxx | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
New commits:
commit 8adf13fe66e1bdc30e3390f59c9fb33269f4b9dc
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Jul 30 15:24:44 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Jul 31 14:24:22 2021 +0200
osl::Mutex->std::mutex in DropTargetHelper
Change-Id: I7a8e58cb023576d671a8b39082f00029d784cc65
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119728
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/include/vcl/transfer.hxx b/include/vcl/transfer.hxx
index 0b13f504926c..99413ad189e3 100644
--- a/include/vcl/transfer.hxx
+++ b/include/vcl/transfer.hxx
@@ -449,7 +449,7 @@ private:
friend class DropTargetHelper::DropTargetListener;
private:
- osl::Mutex maMutex;
+ std::mutex maMutex;
css::uno::Reference< css::datatransfer::dnd::XDropTarget > mxDropTarget;
css::uno::Reference< css::datatransfer::dnd::XDropTargetListener > mxDropTargetListener;
diff --git a/vcl/source/treelist/transfer2.cxx b/vcl/source/treelist/transfer2.cxx
index fb7877e60ff1..58e217996350 100644
--- a/vcl/source/treelist/transfer2.cxx
+++ b/vcl/source/treelist/transfer2.cxx
@@ -244,9 +244,8 @@ void DropTargetHelper::dispose()
{
Reference< XDropTarget > xTmp;
{
- osl::MutexGuard aGuard( maMutex );
- xTmp = mxDropTarget;
- mxDropTarget.clear();
+ std::lock_guard aGuard( maMutex );
+ xTmp = std::move(mxDropTarget);
}
if( xTmp.is() )
xTmp->removeDropTargetListener( mxDropTargetListener );
More information about the Libreoffice-commits
mailing list