Silent clang -Wshadow warning. (#812)

Add an optional extended description…
This commit is contained in:
Simon Martin 2016-07-09 18:07:58 +01:00 committed by PKEuS
parent 4eef5642c9
commit bae81fba05
1 changed files with 3 additions and 3 deletions

View File

@ -1772,17 +1772,17 @@ CheckBufferOverrun::ArrayInfo::ArrayInfo()
{
}
CheckBufferOverrun::ArrayInfo::ArrayInfo(const Variable *var, const SymbolDatabase * symbolDatabase, const unsigned int forcedeclid)
CheckBufferOverrun::ArrayInfo::ArrayInfo(const Variable *var, const SymbolDatabase * symDb, const unsigned int forcedeclid)
: _varname(var->name()), _declarationId((forcedeclid == 0U) ? var->declarationId() : forcedeclid)
{
for (std::size_t i = 0; i < var->dimensions().size(); i++)
_num.push_back(var->dimension(i));
if (var->typeEndToken()->str() == "*")
_element_size = symbolDatabase->sizeOfType(var->typeEndToken());
_element_size = symDb->sizeOfType(var->typeEndToken());
else if (var->typeStartToken()->str() == "struct")
_element_size = 100;
else {
_element_size = symbolDatabase->sizeOfType(var->typeEndToken());
_element_size = symDb->sizeOfType(var->typeEndToken());
}
}