Extract and reuse size computation

This commit is contained in:
Dmitry-Me 2017-10-19 00:25:21 +03:00
parent 34a8d2431f
commit 606e28a3c5
1 changed files with 1 additions and 1 deletions

View File

@ -643,7 +643,7 @@ unsigned int getSizeOfType(const Token *typeTok, const Settings *settings)
const std::string &typeStr = typeTok->str(); const std::string &typeStr = typeTok->str();
if (typeStr == "char") if (typeStr == "char")
return 1; return 1;
else if (typeStr == "short) else if (typeStr == "short")
return settings->sizeof_short; return settings->sizeof_short;
else if (typeStr == "int") else if (typeStr == "int")
return settings->sizeof_int; return settings->sizeof_int;