[Libreoffice-commits] core.git: sfx2/source
Julien Nabet
serval2412 at yahoo.fr
Sat Oct 14 09:02:37 UTC 2017
sfx2/source/dialog/itemconnect.cxx | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
New commits:
commit 3431e3f6911fe5541f484359d0a8725726a90b00
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Fri Oct 13 21:51:48 2017 +0200
Replace list by vector itemconnect (sfx2)
Change-Id: I753f655c11883e5bf705a2361a6d4d5e55ea88c9
Reviewed-on: https://gerrit.libreoffice.org/43377
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
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;
}
More information about the Libreoffice-commits
mailing list