Converted (almost) all for-loops with iterators or indices to range-based
This commit is contained in:
parent
073377a4e4
commit
1f3ba8a0b6
19 changed files with 136 additions and 220 deletions
|
@ -64,8 +64,8 @@ namespace Catch {
|
|||
|
||||
bool matches( TestCaseInfo const& testCase ) const {
|
||||
// All patterns in a filter must match for the filter to be a match
|
||||
for( std::vector<Ptr<Pattern> >::const_iterator it = m_patterns.begin(), itEnd = m_patterns.end(); it != itEnd; ++it ) {
|
||||
if( !(*it)->matches( testCase ) )
|
||||
for( auto const& pattern : m_patterns ) {
|
||||
if( !pattern->matches( testCase ) )
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -78,8 +78,8 @@ namespace Catch {
|
|||
}
|
||||
bool matches( TestCaseInfo const& testCase ) const {
|
||||
// A TestSpec matches if any filter matches
|
||||
for( std::vector<Filter>::const_iterator it = m_filters.begin(), itEnd = m_filters.end(); it != itEnd; ++it )
|
||||
if( it->matches( testCase ) )
|
||||
for( auto const& filter : m_filters )
|
||||
if( filter.matches( testCase ) )
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue