Refactoring; Reuse variable typeSize
This commit is contained in:
parent
a6ab986217
commit
84bb024662
|
@ -214,10 +214,10 @@ static bool getDimensionsEtc(const Token * const arrayToken, const Settings *set
|
|||
Dimension dim;
|
||||
dim.known = value->isKnown();
|
||||
dim.tok = nullptr;
|
||||
int typeSize = array->valueType()->typeSize(*settings);
|
||||
const int typeSize = array->valueType()->typeSize(*settings);
|
||||
if (typeSize == 0)
|
||||
return false;
|
||||
dim.num = value->intvalue / array->valueType()->typeSize(*settings);
|
||||
dim.num = value->intvalue / typeSize;
|
||||
dimensions->emplace_back(dim);
|
||||
}
|
||||
return !dimensions->empty();
|
||||
|
|
Loading…
Reference in New Issue