Fix Cppcheck performance warnings

This commit is contained in:
Daniel Marjamäki 2017-11-09 23:18:00 +01:00
parent 799f953c00
commit 7ec0e41196
1 changed files with 2 additions and 2 deletions

View File

@ -2860,7 +2860,7 @@ void Tokenizer::setVarIdPass1()
namespace {
struct Member {
Member(const std::list<std::string> &s, const std::list<const Token *> ns, Token *t) : usingnamespaces(ns), scope(s), tok(t) {}
Member(const std::list<std::string> &s, const std::list<const Token *> &ns, Token *t) : usingnamespaces(ns), scope(s), tok(t) {}
std::list<const Token *> usingnamespaces;
std::list<std::string> scope;
Token *tok;
@ -2921,7 +2921,7 @@ static Token * matchMemberName(const std::list<std::string> &scope, const Token
return nullptr;
}
memberToken = memberToken->tokAt(2);
scopeIt++;
++scopeIt;
}
return Token::Match(memberToken, "~| %name%") ? memberToken : nullptr;