summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2017-11-04 15:29:53 +0100
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-11-05 06:30:57 +0100
commitca2aaa2b9f4ce69d05d415e13451ae6a6030f032 (patch)
tree88aff78ecf2c79c5d6acda09dc20034aa46f8368 /svtools
parent6070dec9ca9a15587a2aece81f9ae1ab5ac0f8c4 (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')
-rw-r--r--svtools/source/config/miscopt.cxx17
-rw-r--r--svtools/source/misc/transfer2.cxx2
-rw-r--r--svtools/source/uno/unoimap.cxx2
3 files changed, 7 insertions, 14 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 )
diff --git a/svtools/source/misc/transfer2.cxx b/svtools/source/misc/transfer2.cxx
index 9073fe0fba07..7a4e1e3b6e44 100644
--- a/svtools/source/misc/transfer2.cxx
+++ b/svtools/source/misc/transfer2.cxx
@@ -323,7 +323,7 @@ struct TDataCntnrEntry_Impl
};
-typedef ::std::list< TDataCntnrEntry_Impl > TDataCntnrEntryList;
+typedef ::std::vector< TDataCntnrEntry_Impl > TDataCntnrEntryList;
struct TransferDataContainer_Impl
diff --git a/svtools/source/uno/unoimap.cxx b/svtools/source/uno/unoimap.cxx
index 58f95496182f..e7e7398dea72 100644
--- a/svtools/source/uno/unoimap.cxx
+++ b/svtools/source/uno/unoimap.cxx
@@ -536,7 +536,7 @@ public:
private:
OUString maName;
- std::list< rtl::Reference<SvUnoImageMapObject> > maObjectList;
+ std::vector< rtl::Reference<SvUnoImageMapObject> > maObjectList;
};
UNO3_GETIMPLEMENTATION_IMPL( SvUnoImageMap );