Omit unneeded deep copy

This commit is contained in:
Dmitry-Me 2015-12-23 10:32:59 +03:00
parent 31171f038a
commit 5cba4ac602
1 changed files with 3 additions and 2 deletions

View File

@ -1427,13 +1427,14 @@ void CheckBufferOverrun::bufferOverrun2()
continue;
// Set full varname..
std::string varname(tok->str());
std::string varname;
if (tok->astParent() && tok->astParent()->str() == ".") {
const Token *parent = tok->astParent();
while (parent->astParent() && parent->astParent()->str() == ".")
parent = parent->astParent();
varname = parent->expressionString();
}
} else
varname = tok->str();
const Token * const strtoken = tok->getValueTokenMinStrSize();