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:
Edoardo Prezioso 2012-11-04 22:41:38 +01:00
parent 24bf6f99e1
commit 333711ae4f
1 changed files with 0 additions and 8 deletions

View File

@ -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);
}
}
}