COMMIT: changed BOOST_FOREACH to for.

This commit is contained in:
Maciej Suminski 2016-06-09 14:28:06 +02:00
parent 9861b35707
commit 0223425d30
2 changed files with 12 additions and 10 deletions

View File

@ -25,7 +25,6 @@
#include <commit.h>
#include <class_undoredo_container.h>
#include <boost/foreach.hpp>
COMMIT::COMMIT()
{
@ -37,7 +36,7 @@ COMMIT::~COMMIT()
{
if( !m_committed )
{
BOOST_FOREACH( COMMIT_LINE& ent, m_changes )
for( COMMIT_LINE& ent : m_changes )
{
if( ent.m_copy )
delete ent.m_copy;
@ -89,6 +88,17 @@ COMMIT& COMMIT::Stage( EDA_ITEM* aItem, CHANGE_TYPE aChangeType )
}
COMMIT& COMMIT::Stage( std::vector<EDA_ITEM*>& container, CHANGE_TYPE aChangeType )
{
for( EDA_ITEM* item : container )
{
Stage( item, aChangeType );
}
return *this;
}
void COMMIT::Stage( const PICKED_ITEMS_LIST& aItems, CHANGE_TYPE aChangeType )
{
for( unsigned int i = 0; i < aItems.GetCount(); i++ )

View File

@ -29,7 +29,6 @@
#include <vector>
#include <base_struct.h>
#include <boost/foreach.hpp>
class PICKED_ITEMS_LIST;
@ -77,13 +76,6 @@ public:
///> Adds a change of the item aItem of type aChangeType to the change list.
virtual COMMIT& Stage( EDA_ITEM* aItem, CHANGE_TYPE aChangeType );
void Stage( std::vector<EDA_ITEM*>& container, CHANGE_TYPE aChangeType )
{
BOOST_FOREACH( EDA_ITEM* item, container )
{
Stage( item, aChangeType );
}
}
void Stage( const PICKED_ITEMS_LIST& aItems, CHANGE_TYPE aChangeType );