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:
@@ -159,7 +159,7 @@ void DsgPrs_LengthPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
|
||||
Standard_Real Par1 = ElCLib::Parameter( LengthLine, EndOfArrow1 );
|
||||
Standard_Real Par2 = ElCLib::Parameter( LengthLine, EndOfArrow2 );
|
||||
gp_Pnt FirstPoint, LastPoint;
|
||||
if (Par1 > 0.0 && Par2 > 0.0 || Par1 < 0.0 && Par2 < 0.0)
|
||||
if ((Par1 > 0.0 && Par2 > 0.0) || (Par1 < 0.0 && Par2 < 0.0))
|
||||
{
|
||||
FirstPoint = OffsetPoint;
|
||||
LastPoint = (Abs( Par1 ) > Abs( Par2 ))? EndOfArrow1 : EndOfArrow2;
|
||||
@@ -310,7 +310,7 @@ void DsgPrs_LengthPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
|
||||
Standard_Real Par1 = ElCLib::Parameter( LengthLine, AttachmentPoint1 );
|
||||
Standard_Real Par2 = ElCLib::Parameter( LengthLine, EndOfArrow2 );
|
||||
gp_Pnt FirstPoint, LastPoint;
|
||||
if (Par1 > 0.0 && Par2 > 0.0 || Par1 < 0.0 && Par2 < 0.0)
|
||||
if ((Par1 > 0.0 && Par2 > 0.0) || (Par1 < 0.0 && Par2 < 0.0))
|
||||
{
|
||||
FirstPoint = OffsetPoint;
|
||||
LastPoint = (Abs( Par1 ) > Abs( Par2 ))? AttachmentPoint1 : EndOfArrow2;
|
||||
|
@@ -178,8 +178,8 @@ static Standard_Boolean ComputeDir(const TopoDS_Shape& shape, gp_Pnt& pt, gp_Dir
|
||||
pt = lProps.Value();
|
||||
dir = lProps.Normal();
|
||||
}
|
||||
if ((shape.Orientation() == TopAbs_FORWARD) && (mode == 1) ||
|
||||
(shape.Orientation() == TopAbs_REVERSED) && (mode == 0)) {
|
||||
if (((shape.Orientation() == TopAbs_FORWARD) && (mode == 1)) ||
|
||||
((shape.Orientation() == TopAbs_REVERSED) && (mode == 0))) {
|
||||
dir.Reverse();
|
||||
}
|
||||
return Standard_True;
|
||||
|
Reference in New Issue
Block a user