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

@@ -99,15 +99,13 @@ namespace Catch {
if( includeResults ) {
// Print any info messages in <Info> tags.
for( std::vector<MessageInfo>::const_iterator it = assertionStats.infoMessages.begin(), itEnd = assertionStats.infoMessages.end();
it != itEnd;
++it ) {
if( it->type == ResultWas::Info ) {
for( auto const& msg : assertionStats.infoMessages ) {
if( msg.type == ResultWas::Info ) {
m_xml.scopedElement( "Info" )
.writeText( it->message );
} else if ( it->type == ResultWas::Warning ) {
.writeText( msg.message );
} else if ( msg.type == ResultWas::Warning ) {
m_xml.scopedElement( "Warning" )
.writeText( it->message );
.writeText( msg.message );
}
}
}