Converted (almost) all for-loops with iterators or indices to range-based

This commit is contained in:
Phil Nash
2017-04-25 11:06:52 +01:00
parent 073377a4e4
commit 1f3ba8a0b6
19 changed files with 136 additions and 220 deletions

View File

@@ -60,10 +60,8 @@ namespace Catch {
bool hasUntestedSections() const {
if( m_state == Unknown )
return true;
for( SubSections::const_iterator it = m_subSections.begin();
it != m_subSections.end();
++it)
if( (*it)->hasUntestedSections() )
for( auto subSection : m_subSections )
if( subSection->hasUntestedSections() )
return true;
return false;
}
@@ -75,10 +73,8 @@ namespace Catch {
}
RunningSection* findOrAddSubSection( std::string const& name, bool& changed ) {
for( SubSections::const_iterator it = m_subSections.begin();
it != m_subSections.end();
++it)
if( (*it)->getName() == name )
for( auto subSection : m_subSections )
if( subSection->getName() == name )
return *it;
RunningSection* subSection = new RunningSection( this, name );
m_subSections.push_back( subSection );