diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-07 13:50:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-09 08:44:23 +0200 |
commit | 28bfc9ba5f64e2408b06e451c5ca7bbf23feeb19 (patch) | |
tree | 63d9f71a84b9f9ed13f7925db8711b28a23da476 /vcl | |
parent | 54f7d107c121403d0a73454ef83f79e0e61b757b (diff) |
std::list->std::vector in X11Clipboard
Change-Id: If63ba386c120579da1e85e9056a9cdc080c916fc
Reviewed-on: https://gerrit.libreoffice.org/52541
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_clipboard.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/dtrans/X11_clipboard.hxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/vcl/unx/generic/dtrans/X11_clipboard.cxx b/vcl/unx/generic/dtrans/X11_clipboard.cxx index c4173b138186..56d2a2217ea9 100644 --- a/vcl/unx/generic/dtrans/X11_clipboard.cxx +++ b/vcl/unx/generic/dtrans/X11_clipboard.cxx @@ -98,7 +98,7 @@ void X11Clipboard::fireChangedContentsEvent() fprintf( stderr, "X11Clipboard::fireChangedContentsEvent for %s (%" SAL_PRI_SIZET "u listeners)\n", OUStringToOString( m_xSelectionManager->getString( m_aSelection ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), m_aListeners.size() ); #endif - ::std::list< Reference< XClipboardListener > > listeners( m_aListeners ); + ::std::vector< Reference< XClipboardListener > > listeners( m_aListeners ); aGuard.clear(); ClipboardEvent aEvent( static_cast<OWeakObject*>(this), m_aContents); @@ -190,7 +190,7 @@ void SAL_CALL X11Clipboard::addClipboardListener( const Reference< XClipboardLis void SAL_CALL X11Clipboard::removeClipboardListener( const Reference< XClipboardListener >& listener ) { MutexGuard aGuard( m_xSelectionManager->getMutex() ); - m_aListeners.remove( listener ); + m_aListeners.erase( std::remove(m_aListeners.begin(), m_aListeners.end(), listener), m_aListeners.end() ); } Reference< XTransferable > X11Clipboard::getTransferable() diff --git a/vcl/unx/generic/dtrans/X11_clipboard.hxx b/vcl/unx/generic/dtrans/X11_clipboard.hxx index 2f4e55b74773..beee3216bb51 100644 --- a/vcl/unx/generic/dtrans/X11_clipboard.hxx +++ b/vcl/unx/generic/dtrans/X11_clipboard.hxx @@ -42,7 +42,7 @@ namespace x11 { css::uno::Reference< css::datatransfer::clipboard::XClipboardOwner > m_aOwner; rtl::Reference<SelectionManager> m_xSelectionManager; - ::std::list< css::uno::Reference< css::datatransfer::clipboard::XClipboardListener > > m_aListeners; + ::std::vector< css::uno::Reference< css::datatransfer::clipboard::XClipboardListener > > m_aListeners; Atom m_aSelection; X11Clipboard( SelectionManager& rManager, Atom aSelection ); |