[Libreoffice-commits] core.git: vcl/unx
Noel Grandin
noel.grandin at collabora.co.uk
Mon Apr 9 06:48:40 UTC 2018
vcl/unx/generic/dtrans/X11_droptarget.cxx | 10 +++++-----
vcl/unx/generic/dtrans/X11_selection.hxx | 3 ++-
2 files changed, 7 insertions(+), 6 deletions(-)
New commits:
commit 31eed9e7343276589feaf32c56f50c9018fb56f5
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Sat Apr 7 13:56:16 2018 +0200
std::list->std::vector in DropTarget
Change-Id: I4fe707ccea55d8bdc4f108e8af5d5f0223a34776
Reviewed-on: https://gerrit.libreoffice.org/52542
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/vcl/unx/generic/dtrans/X11_droptarget.cxx b/vcl/unx/generic/dtrans/X11_droptarget.cxx
index 94040b39e528..f9d87e18c071 100644
--- a/vcl/unx/generic/dtrans/X11_droptarget.cxx
+++ b/vcl/unx/generic/dtrans/X11_droptarget.cxx
@@ -83,7 +83,7 @@ void DropTarget::removeDropTargetListener( const Reference< XDropTargetListener
{
::osl::Guard< ::osl::Mutex > aGuard( m_aMutex );
- m_aListeners.remove( xListener );
+ m_aListeners.erase( std::remove(m_aListeners.begin(), m_aListeners.end(), xListener), m_aListeners.end() );
}
sal_Bool DropTarget::isActive()
@@ -113,7 +113,7 @@ void DropTarget::setDefaultActions( sal_Int8 actions )
void DropTarget::drop( const DropTargetDropEvent& dtde ) throw()
{
osl::ClearableGuard< ::osl::Mutex > aGuard( m_aMutex );
- std::list< Reference< XDropTargetListener > > aListeners( m_aListeners );
+ std::vector< Reference< XDropTargetListener > > aListeners( m_aListeners );
aGuard.clear();
for (auto const& listener : aListeners)
@@ -125,7 +125,7 @@ void DropTarget::drop( const DropTargetDropEvent& dtde ) throw()
void DropTarget::dragEnter( const DropTargetDragEnterEvent& dtde ) throw()
{
osl::ClearableGuard< ::osl::Mutex > aGuard( m_aMutex );
- std::list< Reference< XDropTargetListener > > aListeners( m_aListeners );
+ std::vector< Reference< XDropTargetListener > > aListeners( m_aListeners );
aGuard.clear();
for (auto const& listener : aListeners)
@@ -137,7 +137,7 @@ void DropTarget::dragEnter( const DropTargetDragEnterEvent& dtde ) throw()
void DropTarget::dragExit( const DropTargetEvent& dte ) throw()
{
osl::ClearableGuard< ::osl::Mutex > aGuard( m_aMutex );
- std::list< Reference< XDropTargetListener > > aListeners( m_aListeners );
+ std::vector< Reference< XDropTargetListener > > aListeners( m_aListeners );
aGuard.clear();
for (auto const& listener : aListeners)
@@ -149,7 +149,7 @@ void DropTarget::dragExit( const DropTargetEvent& dte ) throw()
void DropTarget::dragOver( const DropTargetDragEvent& dtde ) throw()
{
osl::ClearableGuard< ::osl::Mutex > aGuard( m_aMutex );
- std::list< Reference< XDropTargetListener > > aListeners( m_aListeners );
+ std::vector< Reference< XDropTargetListener > > aListeners( m_aListeners );
aGuard.clear();
for (auto const& listener : aListeners)
diff --git a/vcl/unx/generic/dtrans/X11_selection.hxx b/vcl/unx/generic/dtrans/X11_selection.hxx
index 638e0f9f45b2..569e31a8f174 100644
--- a/vcl/unx/generic/dtrans/X11_selection.hxx
+++ b/vcl/unx/generic/dtrans/X11_selection.hxx
@@ -36,6 +36,7 @@
#include <list>
#include <unordered_map>
+#include <vector>
#include <X11/Xlib.h>
@@ -77,7 +78,7 @@ namespace x11 {
::Window m_aTargetWindow;
rtl::Reference<SelectionManager>
m_xSelectionManager;
- ::std::list< css::uno::Reference< css::datatransfer::dnd::XDropTargetListener > >
+ ::std::vector< css::uno::Reference< css::datatransfer::dnd::XDropTargetListener > >
m_aListeners;
DropTarget();
More information about the Libreoffice-commits
mailing list