diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2017-11-04 15:29:53 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-05 06:30:57 +0100 |
commit | ca2aaa2b9f4ce69d05d415e13451ae6a6030f032 (patch) | |
tree | 88aff78ecf2c79c5d6acda09dc20034aa46f8368 /svtools/source/config | |
parent | 6070dec9ca9a15587a2aece81f9ae1ab5ac0f8c4 (diff) |
Replace remaining lists by vectors in svtools
Change-Id: I3b85f4853d305fec2efe1fa351466c56d11473c9
Reviewed-on: https://gerrit.libreoffice.org/44303
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools/source/config')
-rw-r--r-- | svtools/source/config/miscopt.cxx | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx index fa53cf0d2208..4a06f66b2526 100644 --- a/svtools/source/config/miscopt.cxx +++ b/svtools/source/config/miscopt.cxx @@ -33,7 +33,7 @@ #include <vcl/settings.hxx> #include <vcl/toolbox.hxx> -#include <list> +#include <vector> using namespace ::utl ; using namespace ::osl ; @@ -73,7 +73,7 @@ using namespace ::com::sun::star; class SvtMiscOptions_Impl : public ConfigItem { private: - ::std::list<Link<LinkParamNone*,void>> aList; + ::std::vector<Link<LinkParamNone*,void>> aList; bool m_bUseSystemFileDialog; bool m_bIsUseSystemFileDialogRO; bool m_bPluginsEnabled; @@ -521,20 +521,13 @@ void SvtMiscOptions_Impl::AddListenerLink( const Link<LinkParamNone*,void>& rLin void SvtMiscOptions_Impl::RemoveListenerLink( const Link<LinkParamNone*,void>& rLink ) { - for ( ::std::list<Link<LinkParamNone*,void>>::iterator iter = aList.begin(); iter != aList.end(); ++iter ) - { - if ( *iter == rLink ) - { - aList.erase(iter); - break; - } - } + aList.erase(std::remove(aList.begin(), aList.end(), rLink), aList.end()); } void SvtMiscOptions_Impl::CallListeners() { - for ( ::std::list<Link<LinkParamNone*,void>>::const_iterator iter = aList.begin(); iter != aList.end(); ++iter ) - iter->Call( nullptr ); + for (auto const& elem : aList) + elem.Call( nullptr ); } void SvtMiscOptions_Impl::SetToolboxStyle( sal_Int16 nStyle ) |