Improved const correctness. There are no functional changes.
This commit is contained in:
parent
140e086206
commit
537045b176
|
@ -483,7 +483,7 @@ void CheckLeakAutoVar::checkScope(const Token * const startToken,
|
||||||
tok = tok->next();
|
tok = tok->next();
|
||||||
while (Token::Match(tok, "%name% ::|."))
|
while (Token::Match(tok, "%name% ::|."))
|
||||||
tok = tok->tokAt(2);
|
tok = tok->tokAt(2);
|
||||||
bool isnull = tok->hasKnownIntValue() && tok->values().front().intvalue == 0;
|
const bool isnull = tok->hasKnownIntValue() && tok->values().front().intvalue == 0;
|
||||||
if (!isnull && tok->varId() && tok->strAt(1) != "[") {
|
if (!isnull && tok->varId() && tok->strAt(1) != "[") {
|
||||||
VarInfo::AllocInfo allocation(arrayDelete ? -2 : -1, VarInfo::DEALLOC);
|
VarInfo::AllocInfo allocation(arrayDelete ? -2 : -1, VarInfo::DEALLOC);
|
||||||
changeAllocStatus(varInfo, allocation, tok, tok);
|
changeAllocStatus(varInfo, allocation, tok, tok);
|
||||||
|
|
Loading…
Reference in New Issue