mirror of
https://github.com/catchorg/Catch2.git
synced 2025-06-02 09:57:54 +00:00
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
|
@ -88,11 +88,9 @@ public:
|
|||
operator T () const {
|
||||
size_t overallIndex = getCurrentContext().getGeneratorIndex( m_fileInfo, m_totalSize );
|
||||
|
||||
typename std::vector<const IGenerator<T>*>::const_iterator it = m_composed.begin();
|
||||
typename std::vector<const IGenerator<T>*>::const_iterator itEnd = m_composed.end();
|
||||
for( size_t index = 0; it != itEnd; ++it )
|
||||
size_t index = 0;
|
||||
for( auto generator : m_composed )
|
||||
{
|
||||
const IGenerator<T>* generator = *it;
|
||||
if( overallIndex >= index && overallIndex < index + generator->size() )
|
||||
{
|
||||
return generator->getValue( overallIndex-index );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue