Omit unneeded deep copy
This commit is contained in:
parent
31171f038a
commit
5cba4ac602
|
@ -1427,13 +1427,14 @@ void CheckBufferOverrun::bufferOverrun2()
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Set full varname..
|
// Set full varname..
|
||||||
std::string varname(tok->str());
|
std::string varname;
|
||||||
if (tok->astParent() && tok->astParent()->str() == ".") {
|
if (tok->astParent() && tok->astParent()->str() == ".") {
|
||||||
const Token *parent = tok->astParent();
|
const Token *parent = tok->astParent();
|
||||||
while (parent->astParent() && parent->astParent()->str() == ".")
|
while (parent->astParent() && parent->astParent()->str() == ".")
|
||||||
parent = parent->astParent();
|
parent = parent->astParent();
|
||||||
varname = parent->expressionString();
|
varname = parent->expressionString();
|
||||||
}
|
} else
|
||||||
|
varname = tok->str();
|
||||||
|
|
||||||
|
|
||||||
const Token * const strtoken = tok->getValueTokenMinStrSize();
|
const Token * const strtoken = tok->getValueTokenMinStrSize();
|
||||||
|
|
Loading…
Reference in New Issue