Merge pull request #372 from Dmitry-Me/dontUseArrayAtWhenItWouldntThrow
Use [], not at() when the index is guaranteed to be valid.
This commit is contained in:
commit
2e60f30bfc
|
@ -10315,7 +10315,7 @@ void Tokenizer::removeUnnecessaryQualification()
|
||||||
/** @todo this should be made more generic to handle more levels */
|
/** @todo this should be made more generic to handle more levels */
|
||||||
if (Token::Match(tok->tokAt(-2), "%type% ::")) {
|
if (Token::Match(tok->tokAt(-2), "%type% ::")) {
|
||||||
if (classInfo.size() >= 2) {
|
if (classInfo.size() >= 2) {
|
||||||
if (classInfo.at(classInfo.size() - 2).className != tok->strAt(-2))
|
if (classInfo[classInfo.size() - 2].className != tok->strAt(-2))
|
||||||
continue;
|
continue;
|
||||||
else
|
else
|
||||||
qualification = tok->strAt(-2) + "::" + qualification;
|
qualification = tok->strAt(-2) + "::" + qualification;
|
||||||
|
|
Loading…
Reference in New Issue