mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0024177: Eliminate CLang compiler warning -Wlogical-op-parentheses (&& within ||)
Some fixes to eliminate warning
This commit is contained in:
@@ -253,8 +253,8 @@ void ComputeTangency (const IntPatch_TheSOnBounds& solrst,
|
||||
LocTrans = TopAbs_EXTERNAL; // et pourquoi pas INTERNAL
|
||||
}
|
||||
else {
|
||||
if ((test > 0.)&& arcorien == TopAbs_FORWARD ||
|
||||
(test < 0.)&& arcorien == TopAbs_REVERSED){
|
||||
if (((test > 0.)&& arcorien == TopAbs_FORWARD) ||
|
||||
((test < 0.)&& arcorien == TopAbs_REVERSED)){
|
||||
LocTrans = TopAbs_FORWARD;
|
||||
}
|
||||
else {
|
||||
@@ -292,8 +292,8 @@ void ComputeTangency (const IntPatch_TheSOnBounds& solrst,
|
||||
LocTrans = TopAbs_EXTERNAL; // et pourquoi pas INTERNAL
|
||||
}
|
||||
else {
|
||||
if ((test > 0.)&& arcorien == TopAbs_FORWARD ||
|
||||
(test < 0.)&& arcorien == TopAbs_REVERSED){
|
||||
if (((test > 0.)&& arcorien == TopAbs_FORWARD) ||
|
||||
((test < 0.)&& arcorien == TopAbs_REVERSED)){
|
||||
LocTrans = TopAbs_FORWARD;
|
||||
}
|
||||
else {
|
||||
|
@@ -818,32 +818,32 @@ static Standard_Boolean TestWLineIsARLine(const IntPatch_SequenceOfLine& slinref
|
||||
if(slinref.Value(i)->ArcType()==IntPatch_Restriction) {
|
||||
Handle(IntPatch_RLine)& rlin = *((Handle(IntPatch_RLine) *)&(slinref(i)));
|
||||
for (Standard_Integer is=0; is<2; is++) {
|
||||
Standard_Boolean onFirst = is==0;
|
||||
if(onFirst && rlin->IsArcOnS1() || !onFirst && rlin->IsArcOnS2()) {
|
||||
Handle(Adaptor2d_HCurve2d) arc;
|
||||
Standard_Real u,v,u1,v1;
|
||||
if (onFirst) {
|
||||
arc = rlin->ArcOnS1();
|
||||
POn2S.ParametersOnS1(u,v);
|
||||
POn2S1.ParametersOnS1(u1,v1);
|
||||
}
|
||||
else {
|
||||
arc = rlin->ArcOnS2();
|
||||
POn2S.ParametersOnS2(u,v);
|
||||
POn2S1.ParametersOnS2(u1,v1);
|
||||
}
|
||||
if (indicepnt == 1) {
|
||||
u = (u+u1)*0.5;
|
||||
v = (v+v1)*0.5;
|
||||
}
|
||||
const Adaptor2d_Curve2d& C2d=arc->Curve2d();
|
||||
gp_Pnt2d PObt,P2d(u,v);
|
||||
Standard_Real par= Geom2dInt_TheProjPCurOfGInter::FindParameter(C2d,P2d,1e-7);
|
||||
PObt=C2d.Value(par);
|
||||
if(PObt.Distance(P2d) < tol2d) {
|
||||
return Standard_True;
|
||||
}
|
||||
}
|
||||
Standard_Boolean onFirst = is==0;
|
||||
if((onFirst && rlin->IsArcOnS1()) || (!onFirst && rlin->IsArcOnS2())) {
|
||||
Handle(Adaptor2d_HCurve2d) arc;
|
||||
Standard_Real u,v,u1,v1;
|
||||
if (onFirst) {
|
||||
arc = rlin->ArcOnS1();
|
||||
POn2S.ParametersOnS1(u,v);
|
||||
POn2S1.ParametersOnS1(u1,v1);
|
||||
}
|
||||
else {
|
||||
arc = rlin->ArcOnS2();
|
||||
POn2S.ParametersOnS2(u,v);
|
||||
POn2S1.ParametersOnS2(u1,v1);
|
||||
}
|
||||
if (indicepnt == 1) {
|
||||
u = (u+u1)*0.5;
|
||||
v = (v+v1)*0.5;
|
||||
}
|
||||
const Adaptor2d_Curve2d& C2d=arc->Curve2d();
|
||||
gp_Pnt2d PObt,P2d(u,v);
|
||||
Standard_Real par= Geom2dInt_TheProjPCurOfGInter::FindParameter(C2d,P2d,1e-7);
|
||||
PObt=C2d.Value(par);
|
||||
if(PObt.Distance(P2d) < tol2d) {
|
||||
return Standard_True;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -970,8 +970,8 @@ static void TestWLineToRLine(const IntPatch_SequenceOfLine& slinref,
|
||||
Standard_Integer is;
|
||||
for (is=0; is<2; is++) {
|
||||
Standard_Boolean onFirst = is==0;
|
||||
if( onFirst && WLine->HasArcOnS1() ||
|
||||
!onFirst && WLine->HasArcOnS2()) {
|
||||
if(( onFirst && WLine->HasArcOnS1()) ||
|
||||
(!onFirst && WLine->HasArcOnS2())) {
|
||||
PiParOnS piParOnS;
|
||||
PQuery pIsOnDomS;
|
||||
PArcOnS pArcOnS;
|
||||
|
@@ -695,8 +695,8 @@ void IntPatch_RstInt::PutVertexOnLine (Handle(IntPatch_Line)& L,
|
||||
tolU = Max(tolULast,tolU); tolV = Max(tolVLast,tolV);
|
||||
}
|
||||
Standard_Real nptCh = UMaxCh-UMinCh;
|
||||
Standard_Boolean isNptLow = nptCh < 10. && nptCh < Nbptlin/100. ||
|
||||
!Domain->Has3d() && Standard_Integer(nptCh)+1 < Nbptlin;
|
||||
Standard_Boolean isNptLow = (nptCh < 10. && nptCh < Nbptlin/100.) ||
|
||||
(!Domain->Has3d() && Standard_Integer(nptCh)+1 < Nbptlin);
|
||||
if (!isNptLow && !IsSegment2dSmall(Brise,UMinAr,UMaxAr,tolU,tolV)) {
|
||||
// treat both ends
|
||||
Standard_Real UMinChP,UMaxChP,UMinArP,UMaxArP;
|
||||
@@ -797,8 +797,8 @@ void IntPatch_RstInt::PutVertexOnLine (Handle(IntPatch_Line)& L,
|
||||
if (ptsommet.Distance(locpt(j)) <= edgeTol) {
|
||||
if (possiblyClosed) {
|
||||
locpt2(j).Coord(U,V);
|
||||
if (OSurfaceIsUClosed && Abs(U-U2) > tolOUClosed ||
|
||||
OSurfaceIsVClosed && Abs(V-V2) > tolOVClosed)
|
||||
if ((OSurfaceIsUClosed && Abs(U-U2) > tolOUClosed) ||
|
||||
(OSurfaceIsVClosed && Abs(V-V2) > tolOVClosed))
|
||||
continue;
|
||||
}
|
||||
duplicate = Standard_True;
|
||||
@@ -827,14 +827,14 @@ void IntPatch_RstInt::PutVertexOnLine (Handle(IntPatch_Line)& L,
|
||||
// check in 2d
|
||||
if (SurfaceIsUClosed || SurfaceIsVClosed) {
|
||||
GetLinePoint2d (L, paramline, OnFirst, U,V);
|
||||
if (SurfaceIsUClosed && Abs(U-U1) > tolUClosed ||
|
||||
SurfaceIsVClosed && Abs(V-V1) > tolVClosed)
|
||||
if ((SurfaceIsUClosed && Abs(U-U1) > tolUClosed) ||
|
||||
(SurfaceIsVClosed && Abs(V-V1) > tolVClosed))
|
||||
found = Standard_False;
|
||||
}
|
||||
if (found && (OSurfaceIsUClosed || OSurfaceIsVClosed)) {
|
||||
GetLinePoint2d (L, paramline, !OnFirst, U,V);
|
||||
if (OSurfaceIsUClosed && Abs(U-U2) > tolOUClosed ||
|
||||
OSurfaceIsVClosed && Abs(V-V2) > tolOVClosed)
|
||||
if ((OSurfaceIsUClosed && Abs(U-U2) > tolOUClosed) ||
|
||||
(OSurfaceIsVClosed && Abs(V-V2) > tolOVClosed))
|
||||
found = Standard_False;
|
||||
}
|
||||
}
|
||||
@@ -861,22 +861,22 @@ void IntPatch_RstInt::PutVertexOnLine (Handle(IntPatch_Line)& L,
|
||||
? wlin->Vertex(j)
|
||||
: rlin->Vertex(j));
|
||||
Standard_Boolean APointOnRstStillExist =
|
||||
(OnFirst && Rptline.IsOnDomS1() && Rptline.ArcOnS1() == arc ||
|
||||
!OnFirst && Rptline.IsOnDomS2() && Rptline.ArcOnS2() == arc);
|
||||
((OnFirst && Rptline.IsOnDomS1() && Rptline.ArcOnS1() == arc) ||
|
||||
(!OnFirst && Rptline.IsOnDomS2() && Rptline.ArcOnS2() == arc));
|
||||
if(!APointOnRstStillExist) {
|
||||
if (possiblyClosed) {
|
||||
if (SurfaceIsUClosed || SurfaceIsVClosed) {
|
||||
if (OnFirst) Rptline.ParametersOnS1(U,V);
|
||||
else Rptline.ParametersOnS2(U,V);
|
||||
if (SurfaceIsUClosed && Abs(U-U1) > tolUClosed ||
|
||||
SurfaceIsVClosed && Abs(V-V1) > tolVClosed)
|
||||
if ((SurfaceIsUClosed && Abs(U-U1) > tolUClosed) ||
|
||||
(SurfaceIsVClosed && Abs(V-V1) > tolVClosed))
|
||||
continue;
|
||||
}
|
||||
if (OSurfaceIsUClosed || OSurfaceIsVClosed) {
|
||||
if (OnFirst) Rptline.ParametersOnS2(U,V);
|
||||
else Rptline.ParametersOnS1(U,V);
|
||||
if (OSurfaceIsUClosed && Abs(U-U2) > tolOUClosed ||
|
||||
OSurfaceIsVClosed && Abs(V-V2) > tolOVClosed)
|
||||
if ((OSurfaceIsUClosed && Abs(U-U2) > tolOUClosed) ||
|
||||
(OSurfaceIsVClosed && Abs(V-V2) > tolOVClosed))
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -983,8 +983,8 @@ void IntPatch_RstInt::PutVertexOnLine (Handle(IntPatch_Line)& L,
|
||||
// on doit avoir VtxOnArc = True. On duplique le point sur S1
|
||||
// en changeant ArcOnS2.
|
||||
Standard_Boolean OnDifferentRst =
|
||||
(OnFirst && ptline.IsOnDomS1() && ptline.ArcOnS1() != arc ||
|
||||
!OnFirst && ptline.IsOnDomS2() && ptline.ArcOnS2() != arc);
|
||||
((OnFirst && ptline.IsOnDomS1() && ptline.ArcOnS1() != arc) ||
|
||||
(!OnFirst && ptline.IsOnDomS2() && ptline.ArcOnS2() != arc));
|
||||
ptline.SetTolerance(vtxTol);
|
||||
if ( (!ptline.IsVertexOnS1() && OnFirst)
|
||||
|| (!ptline.IsVertexOnS2() && !OnFirst)
|
||||
|
Reference in New Issue
Block a user