1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0024177: Eliminate CLang compiler warning -Wlogical-op-parentheses (&& within ||)

Some fixes to eliminate warning
This commit is contained in:
omy
2013-09-16 13:22:20 +04:00
committed by bugmaster
parent e97ea58f01
commit 0ebaa4dbc9
47 changed files with 197 additions and 204 deletions

View File

@@ -424,8 +424,8 @@ void Poly_MakeLoops::markHangChain(Standard_Integer theNode, Standard_Integer th
Standard_Integer aInd = myMapLink.FindIndex(aL);
if (aInd == 0 || aInd == aIndex)
continue;
if (isOut && aNode1 == aL.node1 ||
!isOut && aNode1 == aL.node2)
if ((isOut && aNode1 == aL.node1) ||
(!isOut && aNode1 == aL.node2))
aInd = -aInd;
if (canLinkBeTaken(aInd))
nEdges++;
@@ -451,8 +451,8 @@ void Poly_MakeLoops::markHangChain(Standard_Integer theNode, Standard_Integer th
Standard_Integer aInd = myMapLink.FindIndex(aL);
if (aInd == 0 || aInd == aIndex)
continue;
if (isOut && aNode1 == aL.node2 ||
!isOut && aNode1 == aL.node1)
if ((isOut && aNode1 == aL.node2) ||
(!isOut && aNode1 == aL.node1))
aInd = -aInd;
if (canLinkBeTaken(aInd))
{

View File

@@ -271,10 +271,8 @@ inline Standard_Integer HashCode(const Poly_MakeLoops::Link& theKey,
inline Standard_Boolean IsEqual(const Poly_MakeLoops::Link& theKey1,
const Poly_MakeLoops::Link& theKey2)
{
return (theKey1.node1 == theKey2.node1 &&
theKey1.node2 == theKey2.node2 ||
theKey1.node1 == theKey2.node2 &&
theKey1.node2 == theKey2.node1);
return ((theKey1.node1 == theKey2.node1 && theKey1.node2 == theKey2.node2) ||
(theKey1.node1 == theKey2.node2 && theKey1.node2 == theKey2.node1));
}
/**