summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2017-10-13 21:51:48 +0200
committerJulien Nabet <serval2412@yahoo.fr>2017-10-14 11:02:14 +0200
commit3431e3f6911fe5541f484359d0a8725726a90b00 (patch)
tree5c49fec51ca4e1fa15baeaa5dc6edfcacf6323e5 /sfx2
parent2b5b8fd39c93166d9e6e696c010482413b155f78 (diff)
Replace list by vector itemconnect (sfx2)
Change-Id: I753f655c11883e5bf705a2361a6d4d5e55ea88c9 Reviewed-on: https://gerrit.libreoffice.org/43377 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/itemconnect.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/sfx2/source/dialog/itemconnect.cxx b/sfx2/source/dialog/itemconnect.cxx
index e793ef7879ce..891cc846c584 100644
--- a/sfx2/source/dialog/itemconnect.cxx
+++ b/sfx2/source/dialog/itemconnect.cxx
@@ -19,7 +19,7 @@
#include <svl/itempool.hxx>
#include <sfx2/itemconnect.hxx>
-#include <list>
+#include <vector>
#include <memory>
namespace sfx {
@@ -247,35 +247,35 @@ public:
private:
typedef std::shared_ptr< ItemConnectionBase > ItemConnectionRef;
- typedef std::list< ItemConnectionRef > ItemConnectionList;
- typedef ItemConnectionList::iterator ItemConnectionListIt;
+ typedef std::vector< ItemConnectionRef > ItemConnectionVector;
+ typedef ItemConnectionVector::iterator ItemConnectionVectorIt;
- ItemConnectionList maList;
+ ItemConnectionVector maVector;
};
void ItemConnectionArrayImpl::Append( ItemConnectionBase* pConnection )
{
if( pConnection )
- maList.push_back( ItemConnectionRef( pConnection ) );
+ maVector.push_back( ItemConnectionRef( pConnection ) );
}
void ItemConnectionArrayImpl::ApplyFlags( const SfxItemSet* pItemSet )
{
- for( ItemConnectionListIt aIt = maList.begin(), aEnd = maList.end(); aIt != aEnd; ++aIt )
- (*aIt)->DoApplyFlags( pItemSet );
+ for (auto const& itemConnection : maVector)
+ itemConnection->DoApplyFlags( pItemSet );
}
void ItemConnectionArrayImpl::Reset( const SfxItemSet* pItemSet )
{
- for( ItemConnectionListIt aIt = maList.begin(), aEnd = maList.end(); aIt != aEnd; ++aIt )
- (*aIt)->DoReset( pItemSet );
+ for (auto const& itemConnection : maVector)
+ itemConnection->DoReset( pItemSet );
}
bool ItemConnectionArrayImpl::FillItemSet( SfxItemSet& rDestSet, const SfxItemSet& rOldSet )
{
bool bChanged = false;
- for( ItemConnectionListIt aIt = maList.begin(), aEnd = maList.end(); aIt != aEnd; ++aIt )
- bChanged |= (*aIt)->DoFillItemSet( rDestSet, rOldSet );
+ for (auto const& itemConnection : maVector)
+ bChanged |= itemConnection->DoFillItemSet( rDestSet, rOldSet );
return bChanged;
}