0028643: Coding rules - eliminate GCC compiler warnings -Wmisleading-indentation

This commit is contained in:
kgv
2017-04-08 14:50:24 +03:00
committed by bugmaster
parent 14c4193d11
commit c48e2889cd
68 changed files with 1691 additions and 1060 deletions

View File

@@ -272,27 +272,70 @@ Interface_CheckStatus Interface_CheckIterator::Status () const
//=======================================================================
//function : Complies
//purpose :
//purpose :
//=======================================================================
Standard_Boolean Interface_CheckIterator::Complies
(const Interface_CheckStatus stat) const
{
Standard_Boolean res = Standard_False;
if (stat == Interface_CheckNoFail) res = Standard_True;
Standard_Integer i, nb = thelist->Length();
for (i = 1; i <= nb; i ++) {
Standard_Boolean res = (stat == Interface_CheckNoFail);
Standard_Integer nb = thelist->Length();
for (Standard_Integer i = 1; i <= nb; ++i)
{
const Handle(Interface_Check) ach = thelist->Value(i);
Standard_Integer nbf = ach->NbFails(), nbw = ach->NbWarnings();
switch (stat) {
case Interface_CheckOK : if (nbf + nbw > 0) return Standard_False; break;
case Interface_CheckWarning : if (nbf > 0) return Standard_False;
if (nbw > 0) res = Standard_True; break;
case Interface_CheckFail : if (nbf > 0) return Standard_True; break;
case Interface_CheckAny : return Standard_True;
case Interface_CheckMessage : if (nbf + nbw > 0) return Standard_True; break;
case Interface_CheckNoFail : if (nbf > 0) return Standard_False; break;
default : break;
switch (stat)
{
case Interface_CheckOK:
{
if (nbf + nbw > 0)
{
return Standard_False;
}
break;
}
case Interface_CheckWarning:
{
if (nbf > 0)
{
return Standard_False;
}
if (nbw > 0)
{
res = Standard_True;
}
break;
}
case Interface_CheckFail:
{
if (nbf > 0)
{
return Standard_True;
}
break;
}
case Interface_CheckAny:
{
return Standard_True;
}
case Interface_CheckMessage:
{
if (nbf + nbw > 0)
{
return Standard_True;
}
break;
}
case Interface_CheckNoFail:
{
if (nbf > 0)
{
return Standard_False;
}
break;
}
default:
break;
}
}
return res;