Extract and reuse size computation
This commit is contained in:
parent
34a8d2431f
commit
606e28a3c5
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue