From d811a07aa3a42ee9191a127fc4cb6f83342b6c64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 22 Jun 2018 23:04:36 +0200 Subject: [PATCH] CheckOther: Use Variable::valueType() instead of typeStartToken etc --- lib/checkother.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 6e144ff64..582da3d1e 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -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());