Refactoring: Use continue in loop
This commit is contained in:
parent
2f38d3d80e
commit
2d4f64027a
|
@ -386,7 +386,8 @@ void CheckStl::stlOutOfBounds()
|
||||||
tok = tok->next();
|
tok = tok->next();
|
||||||
|
|
||||||
// check if the for loop condition is wrong
|
// check if the for loop condition is wrong
|
||||||
if (Token::Match(tok, "%var% <= %var% . %name% ( ) ;|)|%oror%")) {
|
if (!Token::Match(tok, "%var% <= %var% . %name% ( ) ;|)|%oror%"))
|
||||||
|
continue;
|
||||||
// Is it a vector?
|
// Is it a vector?
|
||||||
const Variable *var = tok->tokAt(2)->variable();
|
const Variable *var = tok->tokAt(2)->variable();
|
||||||
if (!var)
|
if (!var)
|
||||||
|
@ -420,8 +421,6 @@ void CheckStl::stlOutOfBounds()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue