sizeof fix. classes and structs are always given the size 100. This removes false positives about mismatching size

This commit is contained in:
Daniel Marjamäki 2009-02-24 16:30:57 +00:00
parent 1e3047b9c2
commit 159332fde4
1 changed files with 2 additions and 7 deletions

View File

@ -675,14 +675,9 @@ void Tokenizer::simplifyTokenList()
_typeSize["double"] = sizeof(double);
for (Token *tok = _tokens; tok; tok = tok->next())
{
if (Token::Match(tok, "class %var%"))
if (Token::Match(tok, "class|struct %var%"))
{
_typeSize[tok->strAt(1)] = 11;
}
else if (Token::Match(tok, "struct %var%"))
{
_typeSize[tok->strAt(1)] = 13;
_typeSize[tok->strAt(1)] = 100;
}
}