1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +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

@@ -38,9 +38,9 @@ extern Standard_Boolean TopOpeBRepDS_GettraceSTRANGE();
//purpose :
//=======================================================================
#ifdef DEB
void TopOpeBRepBuild_Area1dBuilder::DumpList(const TopOpeBRepBuild_ListOfLoop& LOL)
{
#ifdef DEB
Standard_Integer iLOL;
TopOpeBRepBuild_ListIteratorOfListOfLoop itLOL;
for (iLOL = 0, itLOL.Initialize(LOL); itLOL.More(); iLOL++, itLOL.Next()) {
@@ -49,6 +49,9 @@ void TopOpeBRepBuild_Area1dBuilder::DumpList(const TopOpeBRepBuild_ListOfLoop& L
const Handle(TopOpeBRepBuild_Loop)& L = itLOL.Value();
L->Dump();cout<<endl;
}
#else
void TopOpeBRepBuild_Area1dBuilder::DumpList(const TopOpeBRepBuild_ListOfLoop&)
{
#endif
}
@@ -261,19 +264,19 @@ void TopOpeBRepBuild_Area1dBuilder::InitAreaBuilder
void TopOpeBRepBuild_Area1dBuilder::ADD_Loop_TO_LISTOFLoop
(const Handle(TopOpeBRepBuild_Loop)& L,
TopOpeBRepBuild_ListOfLoop& LOL,
const Standard_Address ss) const
{
const Standard_Address
#ifdef DEB
char* s = (char*)ss;
ss
#endif
) const
{
LOL.Append(L);
#ifdef DEB
if (TopOpeBRepBuild_GettraceAREA()) {
cout<<"--------------------- add area loop to area : ";
L->Dump(); cout<<endl;
if (s != NULL) cout<<s<<endl;
if (ss != NULL) cout<<(char*)ss<<endl;
DumpList(LOL);
cout<<"---------------------"<<endl;
}
@@ -288,10 +291,13 @@ void TopOpeBRepBuild_Area1dBuilder::ADD_Loop_TO_LISTOFLoop
void TopOpeBRepBuild_Area1dBuilder::REM_Loop_FROM_LISTOFLoop
(TopOpeBRepBuild_ListIteratorOfListOfLoop& ITA,
TopOpeBRepBuild_ListOfLoop& A,
#ifdef DEB
const Standard_Address ss) const
{
#ifdef DEB
char* s = (char*)ss;
#else
const Standard_Address) const
{
#endif
#ifdef DEB
@@ -322,9 +328,15 @@ void TopOpeBRepBuild_Area1dBuilder::REM_Loop_FROM_LISTOFLoop
void TopOpeBRepBuild_Area1dBuilder::ADD_LISTOFLoop_TO_LISTOFLoop
(TopOpeBRepBuild_ListOfLoop& A1,
TopOpeBRepBuild_ListOfLoop& A2,
#ifdef DEB
const Standard_Address ss,
const Standard_Address ss1,
const Standard_Address ss2) const
#else
const Standard_Address,
const Standard_Address,
const Standard_Address) const
#endif
{
#ifdef DEB
char* s = (char*)ss;

View File

@@ -104,31 +104,6 @@ void TopOpeBRepBuild_FaceBuilder::InitFaceBuilder(TopOpeBRepBuild_WireEdgeSet& W
TopOpeBRepBuild_WireEdgeClassifier WEC(F,BB);
TopOpeBRepBuild_LoopSet& LS = myLoopSet;
myFaceAreaBuilder.InitFaceAreaBuilder(LS,WEC,ForceClass);
// Standard_Boolean hascnxsta = WES.HasConnexStartElement();
// if ( hascnxsta ) {
// myMOSI.Clear();
// InitFace();
// for (;MoreFace();NextFace()) {
// InitWire();
// for (;MoreWire();NextWire()) {
// Standard_Boolean isold = IsOldWire();if (isold) continue;
// InitEdge();
// for(;MoreEdge();NextEdge()) {
// const TopoDS_Shape& E = Edge();
// Standard_Boolean issta = WES.IsStartElement(E);
// Standard_Boolean nsta = WES.NStartElement(E);Standard_Boolean iscnx = (nsta == 2);
// if (!issta || !iscnx ) continue;
// Standard_Boolean isb = myMOSI.IsBound(E);
// if (!isb) myMOSI.Bind(E,0);
// Standard_Integer nmosi = myMOSI(E);
// nmosi++;
// myMOSI(E) = nmosi;
// }
// }
// }
// } // hascnxsta
}
//---------------------------------------------------------------

View File

@@ -116,14 +116,6 @@ is
ChangeStartShapes(me:in out) returns ListOfShape from TopTools;
---C++: return &
IsStartElement(me;S:Shape) returns Boolean;
IsElement(me;S:Shape) returns Boolean;
IsShape(me;S:Shape) returns Boolean;
NStartElement(me;S:Shape) returns Integer;
NElement(me;S:Shape) returns Integer;
NShape(me;S:Shape) returns Integer;
FindNeighbours(me:in out) is virtual;
---Purpose: Build the list of neighbour shapes of myCurrentShape
-- (neighbour shapes and myCurrentShapes are of type t)

View File

@@ -292,95 +292,6 @@ TopTools_ListOfShape& TopOpeBRepBuild_ShapeSet::ChangeStartShapes()
return myStartShapes;
}
//=======================================================================
//function : IsStartElement
//purpose :
//=======================================================================
Standard_Boolean TopOpeBRepBuild_ShapeSet::IsStartElement(const TopoDS_Shape& S) const
{
Standard_Boolean b = Standard_False;
#ifdef DEB
b = myOMSS.Contains(S);
#endif
return b;
}
//=======================================================================
//function : IsElement
//purpose :
//=======================================================================
Standard_Boolean TopOpeBRepBuild_ShapeSet::IsElement(const TopoDS_Shape& S) const
{
Standard_Boolean b = Standard_False;
#ifdef DEB
b = myOMES.Contains(S);
#endif
return b;
}
//=======================================================================
//function : IsShape
//purpose :
//=======================================================================
Standard_Boolean TopOpeBRepBuild_ShapeSet::IsShape(const TopoDS_Shape& S) const
{
Standard_Boolean b = Standard_False;
#ifdef DEB
b = myOMSH.Contains(S);
#endif
return b;
}
//=======================================================================
//function : NStartElement
//purpose :
//=======================================================================
Standard_Integer TopOpeBRepBuild_ShapeSet::NStartElement(const TopoDS_Shape& S) const
{
Standard_Integer n = 0;
#ifdef DEB
Standard_Boolean b = Standard_False;
b = IsStartElement(S);
if (b) n++;
b = IsStartElement(S.Oriented(TopAbs::Complement(S.Orientation())));
if (b) n++;
#endif
return n;
}
//=======================================================================
//function : NElement
//purpose :
//=======================================================================
Standard_Integer TopOpeBRepBuild_ShapeSet::NElement(const TopoDS_Shape& S) const
{
Standard_Integer n = 0;
#ifdef DEB
Standard_Boolean b = Standard_False;
b = IsElement(S); if (b) n++;
b = IsElement(S.Oriented(TopAbs::Complement(S.Orientation())));
if (b) n++;
#endif
return n;
}
//=======================================================================
//function : IsShape
//purpose :
//=======================================================================
Standard_Integer TopOpeBRepBuild_ShapeSet::NShape(const TopoDS_Shape& S) const
{
Standard_Integer n = 0;
#ifdef DEB
Standard_Boolean b = Standard_False;
b = IsShape(S);
if (b) n++;
b = IsShape(S.Oriented(TopAbs::Complement(S.Orientation())));
if (b) n++;
#endif
return n;
}
//=======================================================================
//function : FindNeighbours
//purpose :
@@ -494,7 +405,19 @@ void TopOpeBRepBuild_ShapeSet::DumpName(Standard_OStream& OS,const TCollection_A
//function : DumpCheck
//purpose :
//=======================================================================
void TopOpeBRepBuild_ShapeSet::DumpCheck(Standard_OStream& OS,const TCollection_AsciiString& str,const TopoDS_Shape& S,const Standard_Boolean chk) const
#ifdef DEB
void TopOpeBRepBuild_ShapeSet::DumpCheck(Standard_OStream& OS,
const TCollection_AsciiString& str,
const TopoDS_Shape& S,
const Standard_Boolean chk
#else
void TopOpeBRepBuild_ShapeSet::DumpCheck(Standard_OStream&,
const TCollection_AsciiString&,
const TopoDS_Shape&,
const Standard_Boolean
#endif
) const
{
if (!myCheckShape) return;

View File

@@ -53,7 +53,11 @@ TopOpeBRepBuild_ShapeSet(TopAbs_EDGE)
//=======================================================================
TopOpeBRepBuild_ShellFaceSet::TopOpeBRepBuild_ShellFaceSet
#ifdef DEB
(const TopoDS_Shape& S,const Standard_Address A) : // DEB
#else
(const TopoDS_Shape& S,const Standard_Address) : // DEB
#endif
TopOpeBRepBuild_ShapeSet(TopAbs_EDGE)
{
mySolid = TopoDS::Solid(S);

View File

@@ -61,9 +61,7 @@ is
-- Initialize iterator of neighbour edges to edge myCurrentShape
MakeNeighboursList(me: in out;E,V:Shape) returns ListOfShape from TopTools is redefined;
---C++: return const &
HasConnexStartElement(me) returns Boolean; -- desactivated
-- private
VertexConnectsEdges(me;V,E1,E2:Shape;O1,O2:out Orientation from TopAbs)
returns Boolean is private;
---Purpose:

View File

@@ -354,29 +354,6 @@ const TopTools_ListOfShape & TopOpeBRepBuild_WireEdgeSet::MakeNeighboursList(con
} // MakeNeighoursList
//=======================================================================
//function : HasConnexStartElement
//purpose :
//=======================================================================
Standard_Boolean TopOpeBRepBuild_WireEdgeSet::HasConnexStartElement() const
{
#ifdef DEB
Standard_ProgramError::Raise("WireEdgeSet::HasConnexStartElement management disactivated");
#endif
Standard_Boolean b = Standard_False;
// Standard_Integer n = myOMSS.Extent();
// for(Standard_Integer i=1;i<=n;i++) {
// const TopoDS_Shape& S = myOMSS.FindKey(i);
// Standard_Integer ns = NStartElement(S);
// b = (ns == 2);
// if (b) break;
// }
return b;
}
//=======================================================================
//function : VertexConnectsEdges
//purpose :

View File

@@ -101,7 +101,12 @@ Standard_Boolean TopOpeBRepBuild_Builder::GKeepShape1
// S is used for trace only
//=======================================================================
void TopOpeBRepBuild_Builder::GKeepShapes
(const TopoDS_Shape& S,const TopTools_ListOfShape& LSclass,const TopAbs_State TB,const TopTools_ListOfShape& Lin,TopTools_ListOfShape& Lou)
#ifdef DEB
(const TopoDS_Shape& S,
#else
(const TopoDS_Shape&,
#endif
const TopTools_ListOfShape& LSclass,const TopAbs_State TB,const TopTools_ListOfShape& Lin,TopTools_ListOfShape& Lou)
{
#ifdef DEB
Standard_Integer iS; Standard_Boolean tSPS = GtraceSPS(S,iS);