Using auto instead of container::const_iterator

This commit is contained in:
Julien JEMINE
2020-12-29 16:46:55 +01:00
parent 389cb68b87
commit 9614d8c1d6
2 changed files with 8 additions and 11 deletions

View File

@@ -290,7 +290,7 @@ inline int CountIf(const Container& c, Predicate predicate) {
// Implemented as an explicit loop since std::count_if() in libCstd on
// Solaris has a non-standard signature.
int count = 0;
for (typename Container::const_iterator it = c.begin(); it != c.end(); ++it) {
for (auto it = c.begin(); it != c.end(); ++it) {
if (predicate(*it))
++count;
}