Skip to content

Commit e8656c1

Browse files
committed
Merge pull request #733 from Dmitry-Me/typeInVariableName
Typo in variable name
2 parents bc30f50 + 06ff877 commit e8656c1

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

lib/symboldatabase.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -365,22 +365,22 @@ SymbolDatabase::SymbolDatabase(const Tokenizer *tokenizer, const Settings *setti
365365
// copy/move constructor?
366366
else if (Token::Match(function.tokenDef, "%name% ( const| %name% &|&& &| %name%| )") ||
367367
Token::Match(function.tokenDef, "%name% ( const| %name% <")) {
368-
const Token* typTok = function.tokenDef->tokAt(2);
369-
if (typTok->str() == "const")
370-
typTok = typTok->next();
371-
if (typTok->strAt(1) == "<") { // TODO: Remove this branch (#4710)
372-
if (Token::Match(typTok->linkAt(1), "> & %name%| )"))
368+
const Token* typeTok = function.tokenDef->tokAt(2);
369+
if (typeTok->str() == "const")
370+
typeTok = typeTok->next();
371+
if (typeTok->strAt(1) == "<") { // TODO: Remove this branch (#4710)
372+
if (Token::Match(typeTok->linkAt(1), "> & %name%| )"))
373373
function.type = Function::eCopyConstructor;
374-
else if (Token::Match(typTok->linkAt(1), "> &&|& & %name%| )"))
374+
else if (Token::Match(typeTok->linkAt(1), "> &&|& & %name%| )"))
375375
function.type = Function::eMoveConstructor;
376376
else
377377
function.type = Function::eConstructor;
378-
} else if (typTok->strAt(1) == "&&" || typTok->strAt(2) == "&")
378+
} else if (typeTok->strAt(1) == "&&" || typeTok->strAt(2) == "&")
379379
function.type = Function::eMoveConstructor;
380380
else
381381
function.type = Function::eCopyConstructor;
382382

383-
if (typTok->str() != function.tokenDef->str())
383+
if (typeTok->str() != function.tokenDef->str())
384384
function.type = Function::eConstructor; // Overwrite, if types are not identical
385385
}
386386
// regular constructor

0 commit comments

Comments
 (0)