diff options
author | Baptiste Lepilleur <gaiacrtn@free.fr> | 2003-03-11 19:44:17 +0000 |
---|---|---|
committer | Baptiste Lepilleur <gaiacrtn@free.fr> | 2003-03-11 19:44:17 +0000 |
commit | 6e886d2f1ec0a52a32858e7aa374f031506573d7 (patch) | |
tree | fd4201d35edd9d9a911b5d272a0ded3ebbbd4eeb /include/cppunit | |
parent | db20dd756fef994fca6dd4785f1ac86e76f3f68e (diff) | |
download | cppunit-6e886d2f1ec0a52a32858e7aa374f031506573d7.tar.gz |
switched to an implementation using index instead of iterator to avoid usage of typename
Diffstat (limited to 'include/cppunit')
-rw-r--r-- | include/cppunit/tools/Algorithm.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/include/cppunit/tools/Algorithm.h b/include/cppunit/tools/Algorithm.h index 1d10ca5..143e5d6 100644 --- a/include/cppunit/tools/Algorithm.h +++ b/include/cppunit/tools/Algorithm.h @@ -10,14 +10,10 @@ void removeFromSequence( SequenceType &sequence, const ValueType &valueToRemove ) { - SequenceType::iterator it = sequence.begin(); - SequenceType::iterator itEnd = sequence.end(); - while ( it != itEnd ) + for ( int index =0; index < sequence.size(); ++index ) { - if ( *it == valueToRemove ) - it = sequence.erase( it ); - else - ++it; + if ( sequence[ index ] == valueToRemove ) + sequence.erase( sequence.begin() + index ); } } |