Remove dead branch in simplifySizeof:
the code in that branch won't ever be executed because simplifySizeOf is called after arraySize, which adds the string length inside the '[]' parenthesis.
This commit is contained in:
parent
24bf6f99e1
commit
333711ae4f
|
@ -3022,14 +3022,6 @@ bool Tokenizer::simplifySizeof()
|
|||
tempTok.str("*");
|
||||
sizeOfVar[varId] = MathLib::longToString(sizeOfType(&tempTok));
|
||||
}
|
||||
|
||||
else if (Token::Match(tok->previous(), "%type% %var% [ ] = %str% ;")) {
|
||||
const unsigned int size = sizeOfType(tok->tokAt(4));
|
||||
if (size == 0)
|
||||
continue;
|
||||
|
||||
sizeOfVar[varId] = MathLib::longToString(size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue