From 5c2263fa4e6c66f9dff2d624674713dbc4fa5b5a Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Sun, 27 Sep 2020 12:00:24 +0200 Subject: 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 --- package/source/xstor/ohierarchyholder.cxx | 2 +- package/source/xstor/ohierarchyholder.hxx | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'package') 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 -#include #include #include @@ -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 ) -- cgit v1.2.3