From 7636352267413f203590d2fc707dc002d7c112ac Mon Sep 17 00:00:00 2001 From: abv Date: Tue, 20 Oct 2015 14:04:55 +0300 Subject: [PATCH] 0026788: Compiler warnings when OCCT_DEBUG is enabled Clean-up in code causing warnings when OCCT_DEBUG is enabled Minor corrections: - new compiler warnings on VC++ 14 - rename of "PPC" variables that are said to caused conflicts on PowerPC - removal of unused header TopOpeBRep/TopOpeBRep_tools.hxx --- src/BOPTools/BOPTools_AlgoTools2D_1.cxx | 3 +- src/BRepFeat/BRepFeat_RibSlot.cxx | 3 +- src/BRepFill/BRepFill_CompatibleWires.cxx | 19 +++++++------ .../BRepTopAdaptor_FClass2d.cxx | 3 +- src/BinTools/BinTools_ShapeSet.cxx | 6 ++-- src/Bisector/Bisector_Inter.cxx | 10 +++---- src/Blend/Blend_Walking_4.gxx | 2 -- src/DPrsStd/DPrsStd.cxx | 2 +- src/Draft/Draft_Modification_1.cxx | 2 +- src/Geom/Geom_OffsetSurface.cxx | 2 +- src/GeomFill/GeomFill_GuideTrihedronAC.cxx | 4 +-- src/Plate/Plate_LinearScalarConstraint.cxx | 26 ++++++++--------- src/Plate/Plate_LinearScalarConstraint.hxx | 6 ++-- src/Plate/Plate_LinearXYZConstraint.cxx | 26 ++++++++--------- src/Plate/Plate_LinearXYZConstraint.hxx | 4 +-- src/ProjLib/ProjLib_ComputeApprox.cxx | 2 +- src/TestTopOpe/TestTopOpe_CORCommands.cxx | 28 +------------------ src/TopOpeBRep/FILES | 1 - src/TopOpeBRep/TopOpeBRep_FaceEdgeFiller.cxx | 5 ++-- src/TopOpeBRep/TopOpeBRep_tools.hxx | 21 -------------- src/ViewerTest/ViewerTest.cxx | 17 ++++++----- .../ViewerTest_RelationCommands.cxx | 2 +- 22 files changed, 70 insertions(+), 124 deletions(-) delete mode 100644 src/TopOpeBRep/TopOpeBRep_tools.hxx diff --git a/src/BOPTools/BOPTools_AlgoTools2D_1.cxx b/src/BOPTools/BOPTools_AlgoTools2D_1.cxx index c098f90854..14b04d0c04 100644 --- a/src/BOPTools/BOPTools_AlgoTools2D_1.cxx +++ b/src/BOPTools/BOPTools_AlgoTools2D_1.cxx @@ -294,7 +294,8 @@ Standard_Boolean IsToReverse(const TopoDS_Edge& aEold, aCnew->D1(aTnew, aP, aVnew); aVnew.Normalize(); // - aCtx->ProjectPointOnEdge(aP, aEold, aTold); + if (!aCtx->ProjectPointOnEdge(aP, aEold, aTold)) + return Standard_False; aCold->D1(aTold, aP, aVold); aVold.Normalize(); // diff --git a/src/BRepFeat/BRepFeat_RibSlot.cxx b/src/BRepFeat/BRepFeat_RibSlot.cxx index 1c5099fa8e..38f14f91d4 100644 --- a/src/BRepFeat/BRepFeat_RibSlot.cxx +++ b/src/BRepFeat/BRepFeat_RibSlot.cxx @@ -1073,9 +1073,8 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib, Handle(Geom_TrimmedCurve) curve; curve = new Geom_TrimmedCurve(Cur, f, l, Standard_True); #ifdef OCCT_DEBUG - gp_Pnt P1 = + gp_Pnt P1 = BRep_Tool::Pnt(TopExp::FirstVertex(E,Standard_True)); (void)P1; #endif - BRep_Tool::Pnt(TopExp::FirstVertex(E,Standard_True)); gp_Pnt P2 = BRep_Tool::Pnt(TopExp::LastVertex(E,Standard_True)); ex1.Init(mySbase, TopAbs_FACE); TopoDS_Vertex theVertex; diff --git a/src/BRepFill/BRepFill_CompatibleWires.cxx b/src/BRepFill/BRepFill_CompatibleWires.cxx index 249c50f994..0404580e26 100644 --- a/src/BRepFill/BRepFill_CompatibleWires.cxx +++ b/src/BRepFill/BRepFill_CompatibleWires.cxx @@ -462,17 +462,20 @@ static Standard_Boolean EdgeIntersectOnWire (const gp_Pnt& P1, if (DSS.IsDone()) { // choose the solution closest to P2 Standard_Integer isol = 1; - Standard_Real dss = P2.Distance(DSS.PointOnShape2(isol)); + gp_Pnt Psol = DSS.PointOnShape2(isol); + Standard_Real dss = P2.Distance(Psol); for (Standard_Integer iss=2; iss<=DSS.NbSolution(); iss++) { - if (dss>P2.Distance(DSS.PointOnShape2(iss))) { - dss = P2.Distance(DSS.PointOnShape2(iss)); - isol = iss; - } - } + gp_Pnt Pss = DSS.PointOnShape2(iss); + Standard_Real aDist = P2.Distance(Pss); + if (dss > aDist) { + dss = aDist; + isol = iss; #ifdef OCCT_DEBUG - gp_Pnt Psol = + Psol = Pss; #endif - DSS.PointOnShape2(isol); + } + } + // is the solution a new vertex ? NewVertex = (DSS.SupportTypeShape2(isol) != BRepExtrema_IsVertex); if (NewVertex) { diff --git a/src/BRepTopAdaptor/BRepTopAdaptor_FClass2d.cxx b/src/BRepTopAdaptor/BRepTopAdaptor_FClass2d.cxx index af8e377c98..1b3b5de146 100644 --- a/src/BRepTopAdaptor/BRepTopAdaptor_FClass2d.cxx +++ b/src/BRepTopAdaptor/BRepTopAdaptor_FClass2d.cxx @@ -192,9 +192,8 @@ BRepTopAdaptor_FClass2d::BRepTopAdaptor_FClass2d(const TopoDS_Face& aFace,const //-- Try to remote the first point of the current edge //-- from the last saved point #ifdef OCCT_DEBUG - gp_Pnt2d Pnt2dDebutEdgeCourant= + gp_Pnt2d Pnt2dDebutEdgeCourant = C.Value(u); (void)Pnt2dDebutEdgeCourant; #endif - C.Value(u); //Standard_Real Baillement2dU=0; //Standard_Real Baillement2dV=0; diff --git a/src/BinTools/BinTools_ShapeSet.cxx b/src/BinTools/BinTools_ShapeSet.cxx index baccd2d11b..0162b5f135 100644 --- a/src/BinTools/BinTools_ShapeSet.cxx +++ b/src/BinTools/BinTools_ShapeSet.cxx @@ -795,15 +795,13 @@ void BinTools_ShapeSet::ReadGeometry(const TopAbs_ShapeEnum T, BinTools::GetReal(IS, X); BinTools::GetReal(IS, Y); BinTools::GetReal(IS, Z); - myBuilder.MakeVertex(V,gp_Pnt(X,Y,Z),tol); + gp_Pnt aPnt (X, Y, Z); + myBuilder.MakeVertex (V, aPnt, tol); Handle(BRep_TVertex) TV = Handle(BRep_TVertex)::DownCast(V.TShape()); BRep_ListOfPointRepresentation& lpr = TV->ChangePoints(); TopLoc_Location L; Standard_Boolean aNewF = (myFormatNb > 2) ? Standard_True : Standard_False; -#ifdef OCCT_DEBUG - gp_Pnt aPnt = gp_Pnt(X,Y,Z); -#endif do { if(aNewF) { val = (Standard_Integer)IS.get();//case {0|1|2|3} diff --git a/src/Bisector/Bisector_Inter.cxx b/src/Bisector/Bisector_Inter.cxx index a4c690faa1..f563b7df18 100644 --- a/src/Bisector/Bisector_Inter.cxx +++ b/src/Bisector/Bisector_Inter.cxx @@ -334,13 +334,13 @@ void Bisector_Inter::NeighbourPerform(const Handle(Bisector_BisecCC)& Bis1, // Change guiedline on Bis2. BisTemp = Bis2->ChangeGuide(); Guide = Bis2->Curve(2); -#ifdef OCCT_DEBUG + + // note: returned points are not used in the code, but can be useful for consulting in debugger gp_Pnt2d P2S = Bis2->ValueAndDist(D2.FirstParameter(),U1,UMax,Dist); gp_Pnt2d P2E = Bis2->ValueAndDist(D2.LastParameter() ,U1,UMin,Dist); -#else - Bis2->ValueAndDist(D2.FirstParameter(),U1,UMax,Dist); - Bis2->ValueAndDist(D2.LastParameter() ,U1,UMin,Dist); -#endif + (void)P2S; + (void)P2E; + // Calculate the domain of intersection on the guideline. UMin = Max (D1.FirstParameter(),UMin); UMax = Min (D1.LastParameter() ,UMax); diff --git a/src/Blend/Blend_Walking_4.gxx b/src/Blend/Blend_Walking_4.gxx index 9cc1ab4f11..35c38f2a03 100644 --- a/src/Blend/Blend_Walking_4.gxx +++ b/src/Blend/Blend_Walking_4.gxx @@ -681,10 +681,8 @@ void Blend_Walking::InternalPerform(Blend_Function& Func, Arrive = Standard_True; } break; -#ifndef OCCT_DEBUG default: break; -#endif } if (Arrive) { if (sens > 0.) { diff --git a/src/DPrsStd/DPrsStd.cxx b/src/DPrsStd/DPrsStd.cxx index 5cfefb5c6f..c32f0ab91f 100644 --- a/src/DPrsStd/DPrsStd.cxx +++ b/src/DPrsStd/DPrsStd.cxx @@ -63,7 +63,7 @@ static Standard_Boolean FoundCAFPlugin () { // Define Environment Variable - char *plugin, *casroot, *standard; + const char *plugin, *casroot, *standard; plugin = getenv("CSF_PluginDefaults"); standard = getenv("CSF_StandardDefaults"); casroot = getenv("CASROOT"); diff --git a/src/Draft/Draft_Modification_1.cxx b/src/Draft/Draft_Modification_1.cxx index e021596674..9dc10d82d8 100644 --- a/src/Draft/Draft_Modification_1.cxx +++ b/src/Draft/Draft_Modification_1.cxx @@ -393,7 +393,7 @@ Standard_Boolean Draft_Modification::InternalAdd(const TopoDS_Face& F, TopTools_MapIteratorOfMapOfShape itm(MapOfE); for ( ; itm.More(); itm.Next()) { - Standard_Integer IndToReplace = myEMap.FindIndex(TopoDS::Edge(itm.Key())); + IndToReplace = myEMap.FindIndex(TopoDS::Edge(itm.Key())); if ( IndToReplace ) { Standard_Integer LInd = myEMap.Extent(); diff --git a/src/Geom/Geom_OffsetSurface.cxx b/src/Geom/Geom_OffsetSurface.cxx index b5742968e1..dbaa10f1e8 100644 --- a/src/Geom/Geom_OffsetSurface.cxx +++ b/src/Geom/Geom_OffsetSurface.cxx @@ -1633,7 +1633,7 @@ void Geom_OffsetSurface::SetD0(const Standard_Real U, const Standard_Real V, D1U.SquareMagnitude() + D1V.SquareMagnitude() > MagTol * MagTol) { // Use non-null derivative as normal direction in degenerated case. - gp_Vec aNorm = D1U.SquareMagnitude() > MagTol * MagTol ? D1U : D1V; + aNorm = D1U.SquareMagnitude() > MagTol * MagTol ? D1U : D1V; aNorm.Normalize(); P.SetXYZ(P.XYZ() + offsetValue * signe * aNorm.XYZ()); diff --git a/src/GeomFill/GeomFill_GuideTrihedronAC.cxx b/src/GeomFill/GeomFill_GuideTrihedronAC.cxx index 9c37a8b4f9..ffd39fe41f 100644 --- a/src/GeomFill/GeomFill_GuideTrihedronAC.cxx +++ b/src/GeomFill/GeomFill_GuideTrihedronAC.cxx @@ -247,9 +247,7 @@ GeomFill_GuideTrihedronAC::GeomFill_GuideTrihedronAC(const Handle(Adaptor3d_HCur //derivee seconde du triedre #ifdef OCCT_DEBUG - gp_Vec DTDN = DTo.Crossed(DNormal); -#else - DTo.Crossed(DNormal); + gp_Vec DTDN = DTo.Crossed(DNormal); (void)DTDN; #endif Standard_Real TN2 = TN.SquareMagnitude(); diff --git a/src/Plate/Plate_LinearScalarConstraint.cxx b/src/Plate/Plate_LinearScalarConstraint.cxx index bc5224ed34..17354e8fc4 100644 --- a/src/Plate/Plate_LinearScalarConstraint.cxx +++ b/src/Plate/Plate_LinearScalarConstraint.cxx @@ -34,27 +34,27 @@ Plate_LinearScalarConstraint::Plate_LinearScalarConstraint myCoef->ChangeValue(1,1) = coeff; } -Plate_LinearScalarConstraint::Plate_LinearScalarConstraint(const Plate_Array1OfPinpointConstraint& PPC,const TColgp_Array1OfXYZ& coeff) +Plate_LinearScalarConstraint::Plate_LinearScalarConstraint(const Plate_Array1OfPinpointConstraint& thePPC,const TColgp_Array1OfXYZ& theCoeff) { - if(coeff.Length()!= PPC.Length()) Standard_DimensionMismatch::Raise(); - myPPC = new Plate_HArray1OfPinpointConstraint(1,PPC.Length()); - myCoef = new TColgp_HArray2OfXYZ(1,1,1,coeff.Length()); + if(theCoeff.Length()!= thePPC.Length()) Standard_DimensionMismatch::Raise(); + myPPC = new Plate_HArray1OfPinpointConstraint(1, thePPC.Length()); + myCoef = new TColgp_HArray2OfXYZ(1,1,1, theCoeff.Length()); - myPPC->ChangeArray1() = PPC; - for(Standard_Integer i = 1; i<= coeff.Length(); i++) { - myCoef->ChangeValue(1,i) = coeff(i+coeff.Lower()-1); + myPPC->ChangeArray1() = thePPC; + for(Standard_Integer i = 1; i<= theCoeff.Length(); i++) { + myCoef->ChangeValue(1,i) = theCoeff(i+ theCoeff.Lower()-1); } } Plate_LinearScalarConstraint::Plate_LinearScalarConstraint - (const Plate_Array1OfPinpointConstraint& PPC,const TColgp_Array2OfXYZ& coeff) + (const Plate_Array1OfPinpointConstraint& thePPC,const TColgp_Array2OfXYZ& theCoeff) { - if(coeff.RowLength()!= PPC.Length()) Standard_DimensionMismatch::Raise(); - myPPC = new Plate_HArray1OfPinpointConstraint(1,PPC.Length()); - myCoef = new TColgp_HArray2OfXYZ(1,coeff.ColLength(),1,coeff.RowLength()); + if(theCoeff.RowLength()!= thePPC.Length()) Standard_DimensionMismatch::Raise(); + myPPC = new Plate_HArray1OfPinpointConstraint(1, thePPC.Length()); + myCoef = new TColgp_HArray2OfXYZ(1, theCoeff.ColLength(),1, theCoeff.RowLength()); - myPPC->ChangeArray1() = PPC; - myCoef->ChangeArray2() = coeff; + myPPC->ChangeArray1() = thePPC; + myCoef->ChangeArray2() = theCoeff; } diff --git a/src/Plate/Plate_LinearScalarConstraint.hxx b/src/Plate/Plate_LinearScalarConstraint.hxx index 193bb9082f..c64239ba64 100644 --- a/src/Plate/Plate_LinearScalarConstraint.hxx +++ b/src/Plate/Plate_LinearScalarConstraint.hxx @@ -44,11 +44,11 @@ public: Standard_EXPORT Plate_LinearScalarConstraint(); - Standard_EXPORT Plate_LinearScalarConstraint(const Plate_PinpointConstraint& PPC1, const gp_XYZ& coeff); + Standard_EXPORT Plate_LinearScalarConstraint(const Plate_PinpointConstraint& thePPC1, const gp_XYZ& theCoeff); - Standard_EXPORT Plate_LinearScalarConstraint(const Plate_Array1OfPinpointConstraint& PPC, const TColgp_Array1OfXYZ& coeff); + Standard_EXPORT Plate_LinearScalarConstraint(const Plate_Array1OfPinpointConstraint& thePPC, const TColgp_Array1OfXYZ& theCoeff); - Standard_EXPORT Plate_LinearScalarConstraint(const Plate_Array1OfPinpointConstraint& PPC, const TColgp_Array2OfXYZ& coeff); + Standard_EXPORT Plate_LinearScalarConstraint(const Plate_Array1OfPinpointConstraint& thePPC, const TColgp_Array2OfXYZ& theCoeff); Standard_EXPORT Plate_LinearScalarConstraint(const Standard_Integer ColLen, const Standard_Integer RowLen); diff --git a/src/Plate/Plate_LinearXYZConstraint.cxx b/src/Plate/Plate_LinearXYZConstraint.cxx index 0ec6cc6eb5..b3cda68855 100644 --- a/src/Plate/Plate_LinearXYZConstraint.cxx +++ b/src/Plate/Plate_LinearXYZConstraint.cxx @@ -22,25 +22,25 @@ Plate_LinearXYZConstraint::Plate_LinearXYZConstraint() {} -Plate_LinearXYZConstraint::Plate_LinearXYZConstraint(const Plate_Array1OfPinpointConstraint& PPC,const TColStd_Array1OfReal& coeff) +Plate_LinearXYZConstraint::Plate_LinearXYZConstraint(const Plate_Array1OfPinpointConstraint& thePPC,const TColStd_Array1OfReal& theCoeff) { - if(coeff.Length()!= PPC.Length()) Standard_DimensionMismatch::Raise(); - myPPC = new Plate_HArray1OfPinpointConstraint(1,PPC.Length()); - myCoef = new TColStd_HArray2OfReal(1,1,1,coeff.Length()); + if(theCoeff.Length()!= thePPC.Length()) Standard_DimensionMismatch::Raise(); + myPPC = new Plate_HArray1OfPinpointConstraint(1, thePPC.Length()); + myCoef = new TColStd_HArray2OfReal(1,1,1, theCoeff.Length()); - myPPC->ChangeArray1() = PPC; - for(Standard_Integer i = 1; i<= coeff.Length(); i++) - myCoef->ChangeValue(1,i) = coeff(i+coeff.Lower()-1); + myPPC->ChangeArray1() = thePPC; + for(Standard_Integer i = 1; i<= theCoeff.Length(); i++) + myCoef->ChangeValue(1,i) = theCoeff(i+ theCoeff.Lower()-1); } -Plate_LinearXYZConstraint::Plate_LinearXYZConstraint(const Plate_Array1OfPinpointConstraint& PPC,const TColStd_Array2OfReal& coeff) +Plate_LinearXYZConstraint::Plate_LinearXYZConstraint(const Plate_Array1OfPinpointConstraint& thePPC,const TColStd_Array2OfReal& theCoeff) { - if(coeff.RowLength()!= PPC.Length()) Standard_DimensionMismatch::Raise(); - myPPC = new Plate_HArray1OfPinpointConstraint(1,PPC.Length()); - myCoef = new TColStd_HArray2OfReal(1,coeff.ColLength(),1,coeff.RowLength()); + if(theCoeff.RowLength()!= thePPC.Length()) Standard_DimensionMismatch::Raise(); + myPPC = new Plate_HArray1OfPinpointConstraint(1, thePPC.Length()); + myCoef = new TColStd_HArray2OfReal(1, theCoeff.ColLength(),1, theCoeff.RowLength()); - myPPC->ChangeArray1() = PPC; - myCoef->ChangeArray2() = coeff; + myPPC->ChangeArray1() = thePPC; + myCoef->ChangeArray2() = theCoeff; } diff --git a/src/Plate/Plate_LinearXYZConstraint.hxx b/src/Plate/Plate_LinearXYZConstraint.hxx index 6c2d159a0d..c6e16700c1 100644 --- a/src/Plate/Plate_LinearXYZConstraint.hxx +++ b/src/Plate/Plate_LinearXYZConstraint.hxx @@ -45,9 +45,9 @@ public: Standard_EXPORT Plate_LinearXYZConstraint(); - Standard_EXPORT Plate_LinearXYZConstraint(const Plate_Array1OfPinpointConstraint& PPC, const TColStd_Array1OfReal& coeff); + Standard_EXPORT Plate_LinearXYZConstraint(const Plate_Array1OfPinpointConstraint& thePPC, const TColStd_Array1OfReal& theCoeff); - Standard_EXPORT Plate_LinearXYZConstraint(const Plate_Array1OfPinpointConstraint& PPC, const TColStd_Array2OfReal& coeff); + Standard_EXPORT Plate_LinearXYZConstraint(const Plate_Array1OfPinpointConstraint& thePPC, const TColStd_Array2OfReal& theCoeff); Standard_EXPORT Plate_LinearXYZConstraint(const Standard_Integer ColLen, const Standard_Integer RowLen); diff --git a/src/ProjLib/ProjLib_ComputeApprox.cxx b/src/ProjLib/ProjLib_ComputeApprox.cxx index 894d7a8ab6..5ac8d74ffe 100644 --- a/src/ProjLib/ProjLib_ComputeApprox.cxx +++ b/src/ProjLib/ProjLib_ComputeApprox.cxx @@ -48,7 +48,7 @@ #include #endif #ifdef OCCT_DEBUG -static Standard_Boolean AffichValue = Standard_False; +//static Standard_Boolean AffichValue = Standard_False; #endif //======================================================================= diff --git a/src/TestTopOpe/TestTopOpe_CORCommands.cxx b/src/TestTopOpe/TestTopOpe_CORCommands.cxx index 30253102f1..b0ca3e45b3 100644 --- a/src/TestTopOpe/TestTopOpe_CORCommands.cxx +++ b/src/TestTopOpe/TestTopOpe_CORCommands.cxx @@ -791,30 +791,6 @@ static Standard_Integer shapeclassifier(Draw_Interpretor& di, Standard_Integer n return 0; } - -// normals .. -static Standard_Integer normal(Draw_Interpretor& di, Standard_Integer n, const char** a) -{ - if (n < 3) return 1; - TopoDS_Shape aLocalShape = DBRep::Get(a[1]); - TopoDS_Face f = TopoDS::Face(aLocalShape); -// TopoDS_Face f = TopoDS::Face(DBRep::Get(a[1])); - if (f.IsNull()) {di<<"null shape"<<"\n";return 1;} - gp_Pnt p; DrawTrSurf::GetPoint(a[2], p); - - Standard_Real dist=0.; gp_Pnt2d uv; Standard_Boolean ok = FUN_tool_projPonF(p,f,uv,dist); - if (!ok) {di<<"projection failed"<<"\n"; return 1;} -#ifdef OCCT_DEBUG - gp_Vec ngf = -#endif - FUN_tool_nggeomF(uv,f); - TCollection_AsciiString aa("ngS"); -#ifdef DRAW - FUN_tool_draw(aa,p,ngf,length); -#endif - return 0; -} - static Standard_Integer curvature(Draw_Interpretor& di, Standard_Integer n, const char** a) { if (n < 5) return 1; @@ -893,7 +869,5 @@ void TestTopOpe::CORCommands(Draw_Interpretor& theCommands) theCommands.Add("projponf", "projponf f pnt [extrema flag: -min/-max/-minmax] [extrema algo: -g(grad)/-t(tree)]", __FILE__, projponf, g); - theCommands.Add("normal", "normal f p3d length", __FILE__, normal, g); - theCommands.Add("curvature", "curvature f x y z", __FILE__, curvature , g); - + theCommands.Add("curvature", "curvature f x y z", __FILE__, curvature , g); } diff --git a/src/TopOpeBRep/FILES b/src/TopOpeBRep/FILES index b8428ee540..42703457d6 100755 --- a/src/TopOpeBRep/FILES +++ b/src/TopOpeBRep/FILES @@ -72,7 +72,6 @@ TopOpeBRep_ShapeIntersector2d.hxx TopOpeBRep_ShapeScanner.cxx TopOpeBRep_ShapeScanner.hxx TopOpeBRep_sort.cxx -TopOpeBRep_tools.hxx TopOpeBRep_trace.cxx TopOpeBRep_traceALWL.cxx TopOpeBRep_traceBOOPNINT.cxx diff --git a/src/TopOpeBRep/TopOpeBRep_FaceEdgeFiller.cxx b/src/TopOpeBRep/TopOpeBRep_FaceEdgeFiller.cxx index 4522d0031a..2f3e9414cf 100644 --- a/src/TopOpeBRep/TopOpeBRep_FaceEdgeFiller.cxx +++ b/src/TopOpeBRep/TopOpeBRep_FaceEdgeFiller.cxx @@ -73,7 +73,6 @@ void TopOpeBRep_FaceEdgeFiller::Insert TopOpeBRepDS_DataStructure& BDS = HDS->ChangeDS(); TopAbs_Orientation FFori = FF.Orientation(); - TopAbs_Orientation EEori = EE.Orientation(); // --- Add in BDS Standard_Integer FFindex = BDS.AddShape(FF,1); @@ -91,9 +90,9 @@ void TopOpeBRep_FaceEdgeFiller::Insert Standard_Real parE = FEINT.Parameter(); #ifdef OCCT_DEBUG - TopOpeBRepDS_Transition TFF = + TopAbs_Orientation EEori = EE.Orientation(); + TopOpeBRepDS_Transition TFF = FEINT.Transition(1,EEori); (void)TFF; #endif - FEINT.Transition(1,EEori); // EEori bidon = EXTERNAL TopOpeBRepDS_Transition TEE = FEINT.Transition(2,FFori); TEE.Index(FFindex); diff --git a/src/TopOpeBRep/TopOpeBRep_tools.hxx b/src/TopOpeBRep/TopOpeBRep_tools.hxx deleted file mode 100644 index cf42d5a17e..0000000000 --- a/src/TopOpeBRep/TopOpeBRep_tools.hxx +++ /dev/null @@ -1,21 +0,0 @@ -// Created on: 1997-11-28 -// Created by: Jean Yves LEBEY -// Copyright (c) 1997-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _TopOpeBRep_tools_HeaderFile -#define _TopOpeBRep_tools_HeaderFile - -#include -#endif diff --git a/src/ViewerTest/ViewerTest.cxx b/src/ViewerTest/ViewerTest.cxx index 24413b798d..96bcd5fa16 100644 --- a/src/ViewerTest/ViewerTest.cxx +++ b/src/ViewerTest/ViewerTest.cxx @@ -4595,9 +4595,7 @@ Standard_Boolean ViewerTest::PickObjects(Handle(TColStd_HArray1OfTransient)& ar } // step 2 : wait for the selection... -// Standard_Boolean IsGood (Standard_False); -// Standard_Integer NbPick(0); - Standard_Boolean NbPickGood (0),NbToReach(arr->Length()); + Standard_Integer NbPickGood (0),NbToReach(arr->Length()); Standard_Integer NbPickFail(0); Standard_Integer argccc = 5; const char *bufff[] = { "A", "B", "C","D", "E" }; @@ -4607,7 +4605,7 @@ Standard_Boolean ViewerTest::PickObjects(Handle(TColStd_HArray1OfTransient)& ar while(NbPickGoodNbSelected(); - if((unsigned int ) NbStored != NbPickGood) + if(NbStored != NbPickGood) NbPickGood= NbStored; else NbPickFail++; @@ -4616,7 +4614,8 @@ Standard_Boolean ViewerTest::PickObjects(Handle(TColStd_HArray1OfTransient)& ar // step3 get result. - if((unsigned int ) NbPickFail >= NbToReach) return Standard_False; + if (NbPickFail >= NbToReach) + return Standard_False; Standard_Integer i(0); for(TheAISContext()->InitSelected(); @@ -4769,8 +4768,7 @@ Standard_Boolean ViewerTest::PickShapes (const TopAbs_ShapeEnum TheType, } // step 2 : wait for the selection... - - Standard_Boolean NbPickGood (0),NbToReach(thearr->Length()); + Standard_Integer NbPickGood (0),NbToReach(thearr->Length()); Standard_Integer NbPickFail(0); Standard_Integer argccc = 5; const char *bufff[] = { "A", "B", "C","D", "E" }; @@ -4780,7 +4778,7 @@ Standard_Boolean ViewerTest::PickShapes (const TopAbs_ShapeEnum TheType, while(NbPickGoodNbSelected(); - if((unsigned int ) NbStored != NbPickGood) + if (NbStored != NbPickGood) NbPickGood= NbStored; else NbPickFail++; @@ -4789,7 +4787,8 @@ Standard_Boolean ViewerTest::PickShapes (const TopAbs_ShapeEnum TheType, // step3 get result. - if((unsigned int ) NbPickFail >= NbToReach) return Standard_False; + if (NbPickFail >= NbToReach) + return Standard_False; Standard_Integer i(0); for(TheAISContext()->InitSelected();TheAISContext()->MoreSelected();TheAISContext()->NextSelected()){ diff --git a/src/ViewerTest/ViewerTest_RelationCommands.cxx b/src/ViewerTest/ViewerTest_RelationCommands.cxx index d02de2cb00..f49c62c16a 100644 --- a/src/ViewerTest/ViewerTest_RelationCommands.cxx +++ b/src/ViewerTest/ViewerTest_RelationCommands.cxx @@ -1694,7 +1694,7 @@ static int VLenghtDimension(Draw_Interpretor& di, Standard_Integer argc, const c gp_Pnt A=BRep_Tool::Pnt(aVertex1); #ifdef OCCT_DEBUG - gp_Pnt C = BRep_Tool::Pnt(aVertex2); + gp_Pnt C = BRep_Tool::Pnt(aVertex2); (void)C; #endif gp_Pnt aProjB = aDeltaVertexFace.Point(1); -- 2.20.1