mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 12:55:40 +02:00
Converted a load of spelt out iterators to auto
This commit is contained in:
@@ -277,7 +277,7 @@ namespace Catch {
|
||||
void RunContext::handleUnfinishedSections() {
|
||||
// If sections ended prematurely due to an exception we stored their
|
||||
// infos here so we can tear them down outside the unwind process.
|
||||
for (std::vector<SectionEndInfo>::const_reverse_iterator it = m_unfinishedSections.rbegin(),
|
||||
for (auto it = m_unfinishedSections.rbegin(),
|
||||
itEnd = m_unfinishedSections.rend();
|
||||
it != itEnd;
|
||||
++it)
|
||||
|
@@ -16,7 +16,7 @@ namespace Catch {
|
||||
TagAliasRegistry::~TagAliasRegistry() {}
|
||||
|
||||
Option<TagAlias> TagAliasRegistry::find( std::string const& alias ) const {
|
||||
std::map<std::string, TagAlias>::const_iterator it = m_registry.find( alias );
|
||||
auto it = m_registry.find( alias );
|
||||
if( it != m_registry.end() )
|
||||
return it->second;
|
||||
else
|
||||
|
@@ -167,7 +167,7 @@ namespace TestCaseTracking {
|
||||
}
|
||||
|
||||
virtual ITrackerPtr findChild( NameAndLocation const& nameAndLocation ) override {
|
||||
Children::const_iterator it = std::find_if( m_children.begin(), m_children.end(), TrackerHasName( nameAndLocation ) );
|
||||
auto it = std::find_if( m_children.begin(), m_children.end(), TrackerHasName( nameAndLocation ) );
|
||||
return( it != m_children.end() )
|
||||
? *it
|
||||
: nullptr;
|
||||
|
Reference in New Issue
Block a user