1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0024129: Eliminate remaining compiler warnings in MSVC++ 2008 32 bit with warning level 4

List of resolved warnings:

c4063: Aspect.cdl; TObj_Application.cxx; PCDM.cdl; OpenGl_Workspace_5.cxx;
c4100: XDEDRAW.cxx; ViewerTest_ViewerCommands.cxx; TopOpeBRep_FacesFiller_1.cxx; TopClass_Classifier3d.gxx; TDataStd_ReferenceArray.cxx; QABugs_19.cxx; IntPatch_ImpImpIntersection_5.gxx; HLRTopoBRep_DSFiller.cxx; HLRBRep_Data.lxx; DPrsStd_AISPresentationCommands.cxx; BRepMesh_Delaun.cxx;
c4127: BOPTools_AlgoTools2D.cxx; MAT_Mat.gxx; GeomFill_SweepSectionGenerator.cxx; BRepMesh_Delaun.cxx;
c4189: IntCurveSurface_Inter.gxx; IGESToBRep_BRepEntity.cxx; BRepMesh_Delaun.cxx; BRepAlgo_Loop.cxx; IntStart_SearchOnBoundaries_1.gxx;
c4190: Plugin_Macro.hxx;
c4389: Visual3d_View.cxx; TopOpeBRep/TopOpeBRep_vpr.cxx; TDataStd_BooleanArray.cxx; IntPatch_ALine.cxx;
c4701: BRepAlgo.cxx;
c4702: MNaming_NamingRetrievalDriver_1.cxx; MNaming_NamingRetrievalDriver_2.cxx; BRepClass3d_SolidExplorer.cxx;
c4706: TestTopOpe_BOOP.cxx;

Additional fixes:
- old-style declarations of C functions in IGES and STEP parsers
- clean-up of debug code, fixes for building in Debug mode
- in BRepFill_TrimShellCorner.cxx, lines 878-9, wrong use of assignment instead of comparison fixed
- fix for Plugin_Macro reverted; warning 4190 disabled instead
- in IntPatch_ALine.cxx, line 520, wrong comparison of boolean with index fixed
- in InterfaceGraphic_Visual3d.hxx, field IsCustomMatrix made boolean
- in TopOpeBRepBuild_ShapeSet, obsolete (unused) methods removed
This commit is contained in:
abv
2013-09-18 09:13:31 +04:00
parent 39aac5778a
commit 498ce76bde
88 changed files with 352 additions and 470 deletions

View File

@@ -489,10 +489,10 @@ void TopOpeBRep_EdgesFiller::RecomputeInterferences(const TopoDS_Edge& E,TopOpeB
Handle(TopOpeBRepDS_Interference)& iloi = loi.First();
TopOpeBRepDS_Transition& TU = iloi->ChangeTransition();
Standard_Integer ifb = TU.IndexBefore();
Standard_Integer ifa = TU.IndexAfter();
const TopoDS_Face& fb = TopoDS::Face(myPDS->Shape(ifb));
#ifdef DEB
Standard_Integer ifa = TU.IndexAfter();
if (ifb != ifa) {cout<<"TopOpeBRep_EdgesFiller : ifb != ifa on E"<<EIX<<" NYI"<<endl;}
#endif

View File

@@ -212,7 +212,7 @@ static Standard_Boolean FUN_IoflSsuppS(const TopOpeBRepDS_PDataStructure pDS,
// attached to the edge (stored in the DS).
//=======================================================================
static Standard_Boolean FUN_findTF(const TopOpeBRepDS_PDataStructure pDS,
const Standard_Integer iE, const Standard_Integer iF, const Standard_Integer iOOF,
const Standard_Integer iE, const Standard_Integer, const Standard_Integer iOOF,
TopOpeBRepDS_Transition& TF)
{
Standard_Real factor = 0.5;
@@ -973,8 +973,8 @@ void TopOpeBRep_FacesFiller::FillLineVPonR()
//----------------------------------------------------------------------
#ifdef DEB
Standard_Boolean trcd = Standard_False;
#ifdef DRAW
Standard_Boolean trcd = Standard_False;
if (trcd) FUN_DrawMap(myDataforDegenEd);
#endif
#endif

View File

@@ -89,9 +89,9 @@ TopOpeBRepDS_Transition& TopOpeBRep_Point2d::ChangeTransition(const Standard_Int
//function : Dump
//purpose :
//=======================================================================
#ifdef DEB
void TopOpeBRep_Point2d::Dump(const Standard_Integer E1index,const Standard_Integer E2index) const
{
#ifdef DEB
Standard_Real par1 = Parameter(1);
Standard_Real par2 = Parameter(2);
@@ -142,5 +142,7 @@ void TopOpeBRep_Point2d::Dump(const Standard_Integer E1index,const Standard_Inte
cout<<" PV(2) : "<<P3D.X()<<" "<<P3D.Y()<<" "<<P3D.Z();
}
cout<<endl;
#endif
}
#else
void TopOpeBRep_Point2d::Dump(const Standard_Integer,const Standard_Integer) const {}
#endif

View File

@@ -166,10 +166,10 @@ TopAbs_State TopOpeBRep_FacesFiller::StBipVPonF
gp_Pnt pmil = BC.Value(parmil);
#ifdef DEB
#ifdef DRAW
Standard_Boolean trc = TopOpeBRep_GettraceBIPS();
#ifdef DRAW
if (trc) {TCollection_AsciiString aa("pmil"); FUN_brep_draw(aa,pmil);}
#endif
if (trc) {TCollection_AsciiString aa("pmil"); FUN_brep_draw(aa,pmil);}
#endif
#endif
TopAbs_State st = FSC_StatePonFace (pmil,F,*myPShapeClassifier);
return st;

View File

@@ -424,9 +424,9 @@ Standard_Boolean TopOpeBRep_ShapeIntersector::MoreIntersection() const
//purpose :
//=======================================================================
#ifdef DEB
void TopOpeBRep_ShapeIntersector::DumpCurrent(const Standard_Integer K) const
{
#ifdef DEB
if ( myFFDone ) {
if ( K == 1 ) myFaceScanner.DumpCurrent(cout);
else if ( K == 2 ) myFaceExplorer.DumpCurrent(cout);
@@ -447,19 +447,22 @@ void TopOpeBRep_ShapeIntersector::DumpCurrent(const Standard_Integer K) const
if ( K == 1 ) myEdgeScanner.DumpCurrent(cout);
else if ( K == 2 ) myEdgeExplorer.DumpCurrent(cout);
}
#endif
}
#else
void TopOpeBRep_ShapeIntersector::DumpCurrent(const Standard_Integer) const {}
#endif
//=======================================================================
//function : Index
//purpose :
//=======================================================================
#ifdef DEB
Standard_Integer TopOpeBRep_ShapeIntersector::Index
(const Standard_Integer K)const
{
Standard_Integer i = 0;
#ifdef DEB
if ( myFFDone ) {
if ( K == 1 ) i = myFaceScanner.Index();
else if ( K == 2 ) i = myFaceExplorer.Index();
@@ -480,9 +483,14 @@ Standard_Integer TopOpeBRep_ShapeIntersector::Index
if ( K == 1 ) i = myEdgeScanner.Index();
else if ( K == 2 ) i = myEdgeExplorer.Index();
}
#endif
return i;
}
#else
Standard_Integer TopOpeBRep_ShapeIntersector::Index (const Standard_Integer)const
{
return 0;
}
#endif
//=======================================================================

View File

@@ -152,9 +152,9 @@ Standard_Boolean TopOpeBRep_ShapeIntersector2d::MoreIntersection() const
//purpose :
//=======================================================================
#ifdef DEB
void TopOpeBRep_ShapeIntersector2d::DumpCurrent(const Standard_Integer K) const
{
#ifdef DEB
if ( myFFDone ) {
if ( K == 1 ) myFaceScanner.DumpCurrent(cout);
else if ( K == 2 ) myFaceExplorer.DumpCurrent(cout);
@@ -163,6 +163,9 @@ void TopOpeBRep_ShapeIntersector2d::DumpCurrent(const Standard_Integer K) const
if ( K == 1 ) myEdgeScanner.DumpCurrent(cout);
else if ( K == 2 ) myEdgeExplorer.DumpCurrent(cout);
}
#else
void TopOpeBRep_ShapeIntersector2d::DumpCurrent(const Standard_Integer) const
{
#endif
}
@@ -171,11 +174,12 @@ void TopOpeBRep_ShapeIntersector2d::DumpCurrent(const Standard_Integer K) const
//purpose :
//=======================================================================
#ifdef DEB
Standard_Integer TopOpeBRep_ShapeIntersector2d::Index
(const Standard_Integer K)const
{
Standard_Integer i = 0;
#ifdef DEB
if ( myFFDone ) {
if ( K == 1 ) i = myFaceScanner.Index();
else if ( K == 2 ) i = myFaceExplorer.Index();
@@ -184,9 +188,12 @@ Standard_Integer TopOpeBRep_ShapeIntersector2d::Index
if ( K == 1 ) i = myEdgeScanner.Index();
else if ( K == 2 ) i = myEdgeExplorer.Index();
}
#endif
return i;
}
#else
Standard_Integer TopOpeBRep_ShapeIntersector2d::Index (const Standard_Integer)const { return 0;}
#endif
//=======================================================================

View File

@@ -335,9 +335,9 @@ Standard_OStream& TopOpeBRep_VPointInter::Dump(const Standard_Integer I,const To
//function : Dump
//purpose :
//=======================================================================
#ifdef DEB
Standard_OStream& TopOpeBRep_VPointInter::Dump(const TopoDS_Face& FF1,const TopoDS_Face& FF2,Standard_OStream& OS) const
{
#ifdef DEB
const TopoDS_Face& F1 = TopoDS::Face(FF1);
const TopoDS_Face& F2 = TopoDS::Face(FF2);
OS<<"VP "<<myIndex<<" on "<<myShapeIndex<<" :";
@@ -368,7 +368,9 @@ Standard_OStream& TopOpeBRep_VPointInter::Dump(const TopoDS_Face& FF1,const Topo
Dump(1,F1,OS);
Dump(2,F2,OS);
}
#else
Standard_OStream& TopOpeBRep_VPointInter::Dump(const TopoDS_Face&,const TopoDS_Face&,Standard_OStream& OS) const
{
#endif
return OS;

View File

@@ -187,7 +187,7 @@ static void FUN_VPgeometryfound
Standard_Integer absindex = VP.ShapeIndex();
Standard_Integer OOabsindex = (absindex == 1) ? 2 : 1;
Standard_Boolean OOShapeIndex = (ShapeIndex == 1) ? 2 : 1;
Standard_Integer OOShapeIndex = (ShapeIndex == 1) ? 2 : 1;
Standard_Boolean on2edges = (absindex == 3) || (Lrest && (rkErest == OOabsindex));
TopoDS_Shape edge = (rkErest == ShapeIndex)? Erest : VP.Edge(ShapeIndex);
@@ -228,19 +228,15 @@ static void FUN_VPgeometryfound
else hasOOedge = (VP.State(OOShapeIndex) == TopAbs_ON);
if ( hasOOedge ) {
TopoDS_Shape OOedge;
#ifndef DEB
if (on2edges) OOedge = ((signed) rkErest == (signed) OOShapeIndex)? Erest : VP.Edge(OOShapeIndex);
#else
if (on2edges) OOedge = (rkErest == OOShapeIndex)? Erest : VP.Edge(OOShapeIndex);
#endif
else OOedge = VP.EdgeON(OOShapeIndex);
Standard_Real OOpar = 0.;
#ifndef DEB
if (on2edges) OOpar = ((signed) rkErest == (signed) OOShapeIndex)? parErest : VP.EdgeParameter(OOShapeIndex);
#else
if (on2edges) OOpar = (rkErest == OOShapeIndex)? parErest : VP.EdgeParameter(OOShapeIndex);
#endif
else OOpar = VP.EdgeONParameter(OOShapeIndex);
Standard_Real tolOOe = FUN_tool_maxtol(OOedge);
Standard_Real OOtolp = Precision::Parametric(tolOOe);
if (BDS.HasShape(OOedge)) {