Refactoring
This commit is contained in:
parent
bd5b2133ab
commit
7e8f405c6d
|
@ -1838,13 +1838,13 @@ Variable::Variable(const Token *name_, const std::string &clangType, const Token
|
||||||
mTypeStartToken = mTypeEndToken;
|
mTypeStartToken = mTypeEndToken;
|
||||||
while (Token::Match(mTypeStartToken->previous(), "%type%|*|&"))
|
while (Token::Match(mTypeStartToken->previous(), "%type%|*|&"))
|
||||||
mTypeStartToken = mTypeStartToken->previous();
|
mTypeStartToken = mTypeStartToken->previous();
|
||||||
if (mTypeStartToken->str() == "const")
|
|
||||||
mTypeStartToken = mTypeStartToken->next();
|
|
||||||
if (mTypeStartToken->str() == "struct")
|
|
||||||
mTypeStartToken = mTypeStartToken->next();
|
|
||||||
}
|
}
|
||||||
if (Token::simpleMatch(mTypeStartToken, "static"))
|
|
||||||
setFlag(fIsStatic, true);
|
while (Token::Match(mTypeStartToken, "const|struct|static")) {
|
||||||
|
if (mTypeStartToken->str() == "static")
|
||||||
|
setFlag(fIsStatic, true);
|
||||||
|
mTypeStartToken = mTypeStartToken->next();
|
||||||
|
}
|
||||||
|
|
||||||
if (endsWith(clangType, " &", 2))
|
if (endsWith(clangType, " &", 2))
|
||||||
setFlag(fIsReference, true);
|
setFlag(fIsReference, true);
|
||||||
|
|
Loading…
Reference in New Issue