Break loop early
This commit is contained in:
parent
7c8cb29d14
commit
79f74fc4d3
|
@ -425,12 +425,16 @@ bool CheckClass::canNotMove(const Scope *scope)
|
||||||
constructor = true;
|
constructor = true;
|
||||||
if (func->access != Public)
|
if (func->access != Public)
|
||||||
continue;
|
continue;
|
||||||
if (func->type == Function::eCopyConstructor)
|
if (func->type == Function::eCopyConstructor) {
|
||||||
publicCopy = true;
|
publicCopy = true;
|
||||||
else if (func->type == Function::eMoveConstructor)
|
break;
|
||||||
|
} else if (func->type == Function::eMoveConstructor) {
|
||||||
publicMove = true;
|
publicMove = true;
|
||||||
else if (func->type == Function::eOperatorEqual)
|
break;
|
||||||
|
} else if (func->type == Function::eOperatorEqual) {
|
||||||
publicAssign = true;
|
publicAssign = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return constructor && !(publicAssign || publicCopy || publicMove);
|
return constructor && !(publicAssign || publicCopy || publicMove);
|
||||||
|
|
Loading…
Reference in New Issue