Use [], not at() when the index is guaranteed to be valid.

This commit is contained in:
Dmitry-Me 2014-07-21 10:37:08 +04:00
parent 46a0ab1754
commit cd13232062
1 changed files with 1 additions and 1 deletions

View File

@ -10290,7 +10290,7 @@ void Tokenizer::removeUnnecessaryQualification()
/** @todo this should be made more generic to handle more levels */
if (Token::Match(tok->tokAt(-2), "%type% ::")) {
if (classInfo.size() >= 2) {
if (classInfo.at(classInfo.size() - 2).className != tok->strAt(-2))
if (classInfo[classInfo.size() - 2].className != tok->strAt(-2))
continue;
else
qualification = tok->strAt(-2) + "::" + qualification;