Extract repeating checks
This commit is contained in:
parent
d02d235e5e
commit
7c8cb29d14
|
@ -423,13 +423,13 @@ bool CheckClass::canNotMove(const Scope *scope)
|
||||||
for (func = scope->functionList.begin(); func != scope->functionList.end(); ++func) {
|
for (func = scope->functionList.begin(); func != scope->functionList.end(); ++func) {
|
||||||
if (func->isConstructor())
|
if (func->isConstructor())
|
||||||
constructor = true;
|
constructor = true;
|
||||||
if ((func->type == Function::eCopyConstructor) &&
|
if (func->access != Public)
|
||||||
func->access == Public)
|
continue;
|
||||||
|
if (func->type == Function::eCopyConstructor)
|
||||||
publicCopy = true;
|
publicCopy = true;
|
||||||
else if ((func->type == Function::eMoveConstructor) &&
|
else if (func->type == Function::eMoveConstructor)
|
||||||
func->access == Public)
|
|
||||||
publicMove = true;
|
publicMove = true;
|
||||||
else if (func->type == Function::eOperatorEqual && func->access == Public)
|
else if (func->type == Function::eOperatorEqual)
|
||||||
publicAssign = true;
|
publicAssign = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue