Omit unnecessary checks
This commit is contained in:
parent
9a4bd73a18
commit
7da6ce8704
|
@ -135,8 +135,10 @@ void CheckClass::constructors()
|
|||
unsigned int count = 0;
|
||||
for (var = scope->varlist.begin(); var != scope->varlist.end(); ++var, ++count) {
|
||||
// check for C++11 initializer
|
||||
if (var->hasDefault())
|
||||
if (var->hasDefault()) {
|
||||
usage[count].init = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (usage[count].assign || usage[count].init || var->isStatic())
|
||||
continue;
|
||||
|
@ -994,7 +996,7 @@ void CheckClass::checkMemset()
|
|||
for (const Token *typetok2 = var->typeStartToken(); typetok2 && typetok2 != var->typeEndToken(); typetok2 = typetok2->next()) {
|
||||
if (typetok2->str() == "::")
|
||||
bailout = true;
|
||||
if (typetok2->str() == "{") {
|
||||
else if (typetok2->str() == "{") {
|
||||
bailout = false;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue