diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-07 13:56:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-09 08:48:19 +0200 |
commit | 31eed9e7343276589feaf32c56f50c9018fb56f5 (patch) | |
tree | dc5d8d819376c98de9f02f71b84077124e8ab6ea /vcl | |
parent | 221413dc6f22c6ddf12bfab4b469fbe231635afa (diff) |
std::list->std::vector in DropTarget
Change-Id: I4fe707ccea55d8bdc4f108e8af5d5f0223a34776
Reviewed-on: https://gerrit.libreoffice.org/52542
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/generic/dtrans/X11_droptarget.cxx | 10 | ||||
-rw-r--r-- | vcl/unx/generic/dtrans/X11_selection.hxx | 3 |
2 files changed, 7 insertions, 6 deletions
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(); |