Merge pull request #372 from Dmitry-Me/dontUseArrayAtWhenItWouldntThrow

Use [], not at() when the index is guaranteed to be valid.
This commit is contained in:
Daniel Marjamäki 2014-07-23 14:15:42 +02:00
commit 2e60f30bfc
1 changed files with 1 additions and 1 deletions

View File

@ -10315,7 +10315,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;