No need for counting here
This commit is contained in:
parent
2ea8754088
commit
b995e59ff2
|
@ -2383,13 +2383,14 @@ void CheckClass::checkCopyCtorAndEqOperator()
|
||||||
for (std::size_t i = 0; i < classes; ++i) {
|
for (std::size_t i = 0; i < classes; ++i) {
|
||||||
const Scope * scope = symbolDatabase->classAndStructScopes[i];
|
const Scope * scope = symbolDatabase->classAndStructScopes[i];
|
||||||
|
|
||||||
// count the number of non-static variables
|
bool hasNonStaticVars = false;
|
||||||
int vars = 0;
|
|
||||||
for (std::list<Variable>::const_iterator var = scope->varlist.begin(); var != scope->varlist.end(); ++var) {
|
for (std::list<Variable>::const_iterator var = scope->varlist.begin(); var != scope->varlist.end(); ++var) {
|
||||||
if (!var->isStatic())
|
if (!var->isStatic()) {
|
||||||
vars++;
|
hasNonStaticVars = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (vars == 0)
|
if (!hasNonStaticVars)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
int hasCopyCtor = 0;
|
int hasCopyCtor = 0;
|
||||||
|
|
Loading…
Reference in New Issue