Fixed Cppcheck warning, condition is always false
This commit is contained in:
parent
56df6169fb
commit
4d81b77249
|
@ -1868,7 +1868,6 @@ bool Tokenizer::simplifyUsing()
|
||||||
std::list<ScopeInfo3> scopeList;
|
std::list<ScopeInfo3> scopeList;
|
||||||
bool inTemplateDefinition = false;
|
bool inTemplateDefinition = false;
|
||||||
const Token *endOfTemplateDefinition = nullptr;
|
const Token *endOfTemplateDefinition = nullptr;
|
||||||
bool isVariable = false;
|
|
||||||
struct Using {
|
struct Using {
|
||||||
Using(Token *start, Token *end) : startTok(start), endTok(end) { }
|
Using(Token *start, Token *end) : startTok(start), endTok(end) { }
|
||||||
Token *startTok;
|
Token *startTok;
|
||||||
|
@ -1892,9 +1891,7 @@ bool Tokenizer::simplifyUsing()
|
||||||
|
|
||||||
if (inTemplateDefinition) {
|
if (inTemplateDefinition) {
|
||||||
if (!endOfTemplateDefinition) {
|
if (!endOfTemplateDefinition) {
|
||||||
if (isVariable)
|
if (tok->str() == "{")
|
||||||
endOfTemplateDefinition = findSemicolon(tok);
|
|
||||||
else if (tok->str() == "{")
|
|
||||||
endOfTemplateDefinition = tok->link();
|
endOfTemplateDefinition = tok->link();
|
||||||
}
|
}
|
||||||
if (tok == endOfTemplateDefinition) {
|
if (tok == endOfTemplateDefinition) {
|
||||||
|
|
Loading…
Reference in New Issue