1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-06 18:26:22 +03:00

0024818: CLang warnings -Wlogical-not-parentheses

CLang warnings -Wlogical-not-parentheses were fixed.
This commit is contained in:
ski 2014-04-16 15:59:21 +04:00 committed by abv
parent 26fd0d96ea
commit c29a9290af
11 changed files with 17 additions and 17 deletions

View File

@ -1145,7 +1145,7 @@ Standard_Boolean AIS_Dimension::InitCircularDimension (const TopoDS_Shape& theSh
} }
BRepAdaptor_Curve anAdaptedCurve (anEdge); BRepAdaptor_Curve anAdaptedCurve (anEdge);
if (!anAdaptedCurve.GetType() == GeomAbs_Circle) if (anAdaptedCurve.GetType() != GeomAbs_Circle)
{ {
return Standard_False; return Standard_False;
} }

View File

@ -89,7 +89,7 @@ void AIS_MultipleConnectedInteractive::Connect(const Handle(AIS_InteractiveObjec
//======================================================================= //=======================================================================
Standard_Boolean AIS_MultipleConnectedInteractive::HasConnection() const Standard_Boolean AIS_MultipleConnectedInteractive::HasConnection() const
{ {
return (!myReferences.Length()==0); return (myReferences.Length() != 0);
} }
//======================================================================= //=======================================================================

View File

@ -602,7 +602,7 @@ static gp_Pnt2d ValueOnFace(const Standard_Real U,
Standard_Real UU =0., Dist = Precision::Infinite(), D1, D2; Standard_Real UU =0., Dist = Precision::Infinite(), D1, D2;
if ( !Ext.NbPoints() == 0 ) { if ( Ext.NbPoints() != 0 ) {
UU = Ext.LowerDistanceParameter(); UU = Ext.LowerDistanceParameter();
Dist = Ext.LowerDistance(); Dist = Ext.LowerDistance();
} }

View File

@ -164,7 +164,7 @@ void Bisector_BisecCC::Perform(const Handle(Geom2d_Curve)& Cu1,
} }
} }
if ( !myPolygon.Length() == 0) { if ( myPolygon.Length() != 0 ) {
SupLastParameter(); SupLastParameter();
//---------------------------------------------- //----------------------------------------------
// Construction of the polygon of the bissectrice. // Construction of the polygon of the bissectrice.

View File

@ -188,7 +188,7 @@ HLRTest_DrawableEdgeTool::DrawEdge (Draw_Display& D,
It.NextVisible()) { It.NextVisible()) {
It.Visible(sta,tolsta,end,tolend); It.Visible(sta,tolsta,end,tolend);
D.MoveTo(ec.Value3D(sta)); D.MoveTo(ec.Value3D(sta));
if (!ec.GetType() == GeomAbs_Line) { if (ec.GetType() != GeomAbs_Line) {
Standard_Integer nbPnt = 100; Standard_Integer nbPnt = 100;
Standard_Real step = (end-sta)/(nbPnt+1); Standard_Real step = (end-sta)/(nbPnt+1);
@ -221,7 +221,7 @@ HLRTest_DrawableEdgeTool::DrawEdge (Draw_Display& D,
It.NextHidden()) { It.NextHidden()) {
It.Hidden(sta,tolsta,end,tolend); It.Hidden(sta,tolsta,end,tolend);
D.MoveTo(ec.Value3D(sta)); D.MoveTo(ec.Value3D(sta));
if (!ec.GetType() == GeomAbs_Line) { if (ec.GetType() != GeomAbs_Line) {
Standard_Integer nbPnt = 100; Standard_Integer nbPnt = 100;
Standard_Real step = (end-sta)/(nbPnt+1); Standard_Real step = (end-sta)/(nbPnt+1);

View File

@ -277,7 +277,7 @@ IGESDimen_NewGeneralNote::IGESDimen_NewGeneralNote () { }
Standard_Boolean IGESDimen_NewGeneralNote::IsMirrored Standard_Boolean IGESDimen_NewGeneralNote::IsMirrored
(const Standard_Integer Index) const (const Standard_Integer Index) const
{ {
return (! theMirrorFlags->Value(Index) == 0); return (theMirrorFlags->Value(Index) != 0);
} }
Standard_Integer IGESDimen_NewGeneralNote::RotateFlag Standard_Integer IGESDimen_NewGeneralNote::RotateFlag

View File

@ -589,7 +589,7 @@ TopoDS_Shape IGESToBRep_TopoCurve::TransferOffsetCurve
//AddFail(start, "OffsetCurve Transfer Error : Null IGESEntity"); //AddFail(start, "OffsetCurve Transfer Error : Null IGESEntity");
return res; return res;
} }
if (!start->OffsetType()==1) { if (start->OffsetType() != 1) {
Message_Msg Msg1100("IGES_1100"); //"Offset distance flag different from 1 not treated" Message_Msg Msg1100("IGES_1100"); //"Offset distance flag different from 1 not treated"
SendFail(start,Msg1100); SendFail(start,Msg1100);
//AddFail(start, "Offset distance flag different from 1 not treated"); //AddFail(start, "Offset distance flag different from 1 not treated");
@ -609,7 +609,7 @@ TopoDS_Shape IGESToBRep_TopoCurve::TransferOffsetCurve
while (BaseCrv->IsKind(STANDARD_TYPE(IGESGeom_OffsetCurve))) { while (BaseCrv->IsKind(STANDARD_TYPE(IGESGeom_OffsetCurve))) {
DeclareAndCast(IGESGeom_OffsetCurve, OffCrv, BaseCrv); DeclareAndCast(IGESGeom_OffsetCurve, OffCrv, BaseCrv);
if (!OffCrv->OffsetType()==1) { if (OffCrv->OffsetType() != 1) {
Message_Msg Msg1100("IGES_1100"); //"Offset distance flag different from 1 not treated" Message_Msg Msg1100("IGES_1100"); //"Offset distance flag different from 1 not treated"
SendFail(start,Msg1100); SendFail(start,Msg1100);
return res; return res;
@ -746,7 +746,7 @@ TopoDS_Shape IGESToBRep_TopoCurve::Transfer2dOffsetCurve
return res; return res;
} }
if (!start->OffsetType()==1) { if (start->OffsetType() != 1) {
Message_Msg Msg1100("IGES_1100"); //"Offset distance flag different from 1 not treated" Message_Msg Msg1100("IGES_1100"); //"Offset distance flag different from 1 not treated"
SendFail(start,Msg1100); SendFail(start,Msg1100);
} }

View File

@ -261,7 +261,7 @@ void LocOpe_BuildShape::Perform(const TopTools_ListOfShape& L)
} }
imbSh.Clear(); imbSh.Clear();
} }
} while (!imbSh.Extent() == 0); } while (imbSh.Extent() != 0);
Standard_Integer nbsol = lsolid.Extent(); Standard_Integer nbsol = lsolid.Extent();
Standard_Integer nbshl = lshell.Extent(); Standard_Integer nbshl = lshell.Extent();

View File

@ -115,15 +115,15 @@ Standard_Boolean MAT_Arc::HasNeighbour(const Handle(MAT_Node)& aNode,
{ {
if (aSide == MAT_Left) { if (aSide == MAT_Left) {
// if (aNode == FirstNode()) return (!firstArcLeft == NULL); // if (aNode == FirstNode()) return (!firstArcLeft == NULL);
if (aNode == FirstNode()) return (!firstArcLeft == 0); if (aNode == FirstNode()) return (firstArcLeft != 0);
// if (aNode == SecondNode()) return (!secondArcLeft == NULL); // if (aNode == SecondNode()) return (!secondArcLeft == NULL);
if (aNode == SecondNode()) return (!secondArcLeft == 0); if (aNode == SecondNode()) return (secondArcLeft != 0);
} }
else { else {
// if (aNode == FirstNode()) return (!firstArcRight == NULL); // if (aNode == FirstNode()) return (!firstArcRight == NULL);
if (aNode == FirstNode()) return (!firstArcRight == 0); if (aNode == FirstNode()) return (firstArcRight != 0);
// if (aNode == SecondNode()) return (!secondArcRight == NULL); // if (aNode == SecondNode()) return (!secondArcRight == NULL);
if (aNode == SecondNode()) return (!secondArcRight == 0); if (aNode == SecondNode()) return (secondArcRight != 0);
} }
Standard_DomainError::Raise("MAT_Arc::HasNeighbour"); Standard_DomainError::Raise("MAT_Arc::HasNeighbour");
return Standard_False; return Standard_False;

View File

@ -61,7 +61,7 @@ static void Normal(const TopoDS_Face& aFace,
CSLib_NormalStatus NStat; CSLib_NormalStatus NStat;
S.Initialize(aFace, Standard_False); S.Initialize(aFace, Standard_False);
const TColgp_Array1OfPnt2d& UVNodes = T->UVNodes(); const TColgp_Array1OfPnt2d& UVNodes = T->UVNodes();
if (!S.GetType() == GeomAbs_Plane) { if (S.GetType() != GeomAbs_Plane) {
for (i = UVNodes.Lower(); i <= UVNodes.Upper(); i++) { for (i = UVNodes.Lower(); i <= UVNodes.Upper(); i++) {
U = UVNodes(i).X(); U = UVNodes(i).X();
V = UVNodes(i).Y(); V = UVNodes(i).Y();

View File

@ -557,7 +557,7 @@ void TNaming_NamedShape::References(const Handle(TDF_DataSet)& aDataSet) const
void TNaming_NamedShape::Add(TNaming_Node*& pdn ) void TNaming_NamedShape::Add(TNaming_Node*& pdn )
{ {
pdn->myAtt = this; pdn->myAtt = this;
if (!myNode == 0L){ if (myNode != 0L){
pdn->nextSameAttribute = myNode; pdn->nextSameAttribute = myNode;
} }
myNode = pdn; myNode = pdn;