Kaydet (Commit) c77895fe authored tarafından Julien Nabet's avatar Julien Nabet

Replace list by deque in xsltfilter

+ replace remove by erase remove idiom
+ use push_front instead of using insert at beginning

Change-Id: I3320a4e4cadeee05c7ca347987360c3c75fe6b3d
Reviewed-on: https://gerrit.libreoffice.org/72139
Tested-by: Jenkins
Reviewed-by: 's avatarJulien Nabet <serval2412@yahoo.fr>
üst a813ada3
......@@ -408,14 +408,14 @@ namespace XSLT
void
LibXSLTTransformer::addListener(const css::uno::Reference<XStreamListener>& listener)
{
m_listeners.insert(m_listeners.begin(), listener);
m_listeners.push_front(listener);
}
void
LibXSLTTransformer::removeListener(
const css::uno::Reference<XStreamListener>& listener)
{
m_listeners.remove(listener);
m_listeners.erase( std::remove(m_listeners.begin(), m_listeners.end(), listener ), m_listeners.end() );
}
void
......
......@@ -10,7 +10,7 @@
#ifndef INCLUDED_FILTER_SOURCE_XSLTFILTER_LIBXSLTTRANSFORMER_HXX
#define INCLUDED_FILTER_SOURCE_XSLTFILTER_LIBXSLTTRANSFORMER_HXX
#include <list>
#include <deque>
#include <map>
#include <mutex>
......@@ -109,7 +109,7 @@ namespace XSLT
css::uno::Reference<XOutputStream> m_rOutputStream;
typedef ::std::list<css::uno::Reference<XStreamListener> > ListenerList;
typedef ::std::deque<css::uno::Reference<XStreamListener> > ListenerList;
ListenerList m_listeners;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment