diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2020-09-27 12:00:24 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2020-09-27 12:51:28 +0200 |
commit | 5c2263fa4e6c66f9dff2d624674713dbc4fa5b5a (patch) | |
tree | 988391ceb75d0f57650f92d2358cc9a658df92c9 /package | |
parent | 21484629ef81dc0d081fa07866cd164d2450cf1d (diff) |
Replace list by vector in package/ohierarchyholder
+ rename OWeakStorRefList_Impl to OWeakStorRefVector_Impl
to make it more explicit
Change-Id: I231c9e582cbfb4670835fe1ef0ce41692ad8dcb3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103501
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'package')
-rw-r--r-- | package/source/xstor/ohierarchyholder.cxx | 2 | ||||
-rw-r--r-- | package/source/xstor/ohierarchyholder.hxx | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/package/source/xstor/ohierarchyholder.cxx b/package/source/xstor/ohierarchyholder.cxx index e2f629fa809a..55348f08547c 100644 --- a/package/source/xstor/ohierarchyholder.cxx +++ b/package/source/xstor/ohierarchyholder.cxx @@ -262,7 +262,7 @@ void SAL_CALL OHierarchyElement_Impl::disposing( const lang::EventObject& Source uno::Reference< embed::XExtendedStorageStream > xStream(Source.Source, uno::UNO_QUERY); m_aOpenStreams.erase(std::remove_if(m_aOpenStreams.begin(), m_aOpenStreams.end(), - [&xStream](const OWeakStorRefList_Impl::value_type& rxStorage) { + [&xStream](const OWeakStorRefVector_Impl::value_type& rxStorage) { return !rxStorage.get().is() || rxStorage.get() == xStream; }), m_aOpenStreams.end()); } diff --git a/package/source/xstor/ohierarchyholder.hxx b/package/source/xstor/ohierarchyholder.hxx index 2c2db2662e13..97637c1a9ab0 100644 --- a/package/source/xstor/ohierarchyholder.hxx +++ b/package/source/xstor/ohierarchyholder.hxx @@ -30,7 +30,6 @@ #include <rtl/ref.hxx> -#include <list> #include <unordered_map> #include <vector> @@ -39,8 +38,8 @@ struct OHierarchyElement_Impl; typedef std::unordered_map< OUString, ::rtl::Reference< OHierarchyElement_Impl > > OHierarchyElementList_Impl; -typedef ::std::list< css::uno::WeakReference< css::embed::XExtendedStorageStream > > - OWeakStorRefList_Impl; +typedef ::std::vector< css::uno::WeakReference< css::embed::XExtendedStorageStream > > + OWeakStorRefVector_Impl; struct OHierarchyElement_Impl : public cppu::WeakImplHelper< css::embed::XTransactionListener > { @@ -52,7 +51,7 @@ struct OHierarchyElement_Impl : public cppu::WeakImplHelper< css::embed::XTransa OHierarchyElementList_Impl m_aChildren; - OWeakStorRefList_Impl m_aOpenStreams; + OWeakStorRefVector_Impl m_aOpenStreams; public: explicit OHierarchyElement_Impl( const css::uno::Reference< css::embed::XStorage >& xStorage ) |