CheckOther: Use Variable::valueType() instead of typeStartToken etc

This commit is contained in:
Daniel Marjamäki 2018-06-22 23:04:36 +02:00
parent d0614b9b36
commit d811a07aa3
1 changed files with 1 additions and 1 deletions

View File

@ -1335,7 +1335,7 @@ static std::size_t estimateSize(const Type* type, const Settings* settings, cons
size = settings->sizeof_pointer;
else if (i->type() && i->type()->classScope)
size = estimateSize(i->type(), settings, symbolDatabase, recursionDepth+1);
else if (i->isStlStringType() || (i->isStlType() && Token::Match(i->typeStartToken(), "std :: %type% <") && !Token::simpleMatch(i->typeStartToken()->linkAt(3), "> ::")))
else if (i->valueType()->type == ValueType::Type::CONTAINER)
size = 3 * settings->sizeof_pointer; // Just guess
else
size = symbolDatabase->sizeOfType(i->typeStartToken());