runastyle and fix checkInternal messages.
This commit is contained in:
parent
9ce6630b28
commit
f6c23fa1e7
|
@ -54,7 +54,7 @@ void CheckAssignIf::assignIf()
|
|||
bitop = tok->strAt(2).at(0);
|
||||
num = MathLib::toLongNumber(tok->next()->str());
|
||||
} else {
|
||||
const Token * const endToken = Token::findmatch(tok, ";");
|
||||
const Token * const endToken = Token::findsimplematch(tok, ";");
|
||||
if (endToken && Token::Match(endToken->tokAt(-2), "[&|] %num% ;")) {
|
||||
bitop = endToken->strAt(-2).at(0);
|
||||
num = MathLib::toLongNumber(endToken->previous()->str());
|
||||
|
|
|
@ -1212,7 +1212,7 @@ void CheckNullPointer::nullPointerDefaultArgument()
|
|||
bool unknown = _settings->inconclusive;
|
||||
for (const Token *tok = scope->classStart; tok != scope->classEnd; tok = tok->next()) {
|
||||
// If we encounter a possible NULL-pointer check, skip over its body
|
||||
if (Token::Match(tok, "if ( ")) {
|
||||
if (Token::simpleMatch(tok, "if ( ")) {
|
||||
bool dependsOnPointer = false;
|
||||
const Token *endOfCondition = tok->next()->link();
|
||||
for (const Token *tok2 = tok->next(); tok2 != endOfCondition; tok2 = tok2->next()) {
|
||||
|
@ -1220,7 +1220,7 @@ void CheckNullPointer::nullPointerDefaultArgument()
|
|||
dependsOnPointer = true;
|
||||
}
|
||||
}
|
||||
if (dependsOnPointer && Token::Match(endOfCondition, ") {")) {
|
||||
if (dependsOnPointer && Token::simpleMatch(endOfCondition, ") {")) {
|
||||
tok = endOfCondition->next()->link();
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -639,8 +639,7 @@ bool Token::Match(const Token *tok, const char pattern[], unsigned int varid)
|
|||
multicompare(p,tok->isNumber(),ismulticomp);
|
||||
}
|
||||
break;
|
||||
case 'c':
|
||||
{
|
||||
case 'c': {
|
||||
p += 1;
|
||||
// Character (%char%)
|
||||
if (p[0] == 'h') {
|
||||
|
@ -668,8 +667,7 @@ bool Token::Match(const Token *tok, const char pattern[], unsigned int varid)
|
|||
multicompare(p,tok->isBoolean(),ismulticomp);
|
||||
}
|
||||
break;
|
||||
case 'o':
|
||||
{
|
||||
case 'o': {
|
||||
++p;
|
||||
if (p[1] == '%') {
|
||||
// Op (%op%)
|
||||
|
|
Loading…
Reference in New Issue