1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0026460: Implicit cast to TopoDS_Shape compilation error due to ambiguous conversion

- make operator TopoDS_Shape() cast a "non-const" member function
- make operator TopoDS_*() cast "non-const" when mutating behaviour is possible
- align derived class methods and overrides with the above changes

fix compilation for CR26460
- make argument for IsWRCase2 (non-const) BRepAlgoAPI_BooleanOperation&
This commit is contained in:
cshorler
2015-08-13 10:52:52 +03:00
committed by ski
parent b604f54327
commit ecac41a957
32 changed files with 60 additions and 60 deletions

View File

@@ -1214,7 +1214,7 @@ BRepLib_EdgeError BRepLib_MakeEdge::Error() const
//purpose :
//=======================================================================
const TopoDS_Edge& BRepLib_MakeEdge::Edge()const
const TopoDS_Edge& BRepLib_MakeEdge::Edge()
{
return TopoDS::Edge(Shape());
}
@@ -1250,7 +1250,7 @@ const TopoDS_Vertex& BRepLib_MakeEdge::Vertex2()const
//purpose :
//=======================================================================
BRepLib_MakeEdge::operator TopoDS_Edge() const
BRepLib_MakeEdge::operator TopoDS_Edge()
{
return Edge();
}

View File

@@ -174,8 +174,8 @@ public:
//! Returns the error description when NotDone.
Standard_EXPORT BRepLib_EdgeError Error() const;
Standard_EXPORT const TopoDS_Edge& Edge() const;
Standard_EXPORT operator TopoDS_Edge() const;
Standard_EXPORT const TopoDS_Edge& Edge();
Standard_EXPORT operator TopoDS_Edge();
//! Returns the first vertex of the edge. May be Null.
Standard_EXPORT const TopoDS_Vertex& Vertex1() const;

View File

@@ -738,7 +738,7 @@ BRepLib_EdgeError BRepLib_MakeEdge2d::Error() const
//purpose :
//=======================================================================
const TopoDS_Edge& BRepLib_MakeEdge2d::Edge()const
const TopoDS_Edge& BRepLib_MakeEdge2d::Edge()
{
return TopoDS::Edge(Shape());
}
@@ -774,7 +774,7 @@ const TopoDS_Vertex& BRepLib_MakeEdge2d::Vertex2()const
//purpose :
//=======================================================================
BRepLib_MakeEdge2d::operator TopoDS_Edge() const
BRepLib_MakeEdge2d::operator TopoDS_Edge()
{
return Edge();
}

View File

@@ -146,8 +146,8 @@ public:
//! Returns the error description when NotDone.
Standard_EXPORT BRepLib_EdgeError Error() const;
Standard_EXPORT const TopoDS_Edge& Edge() const;
Standard_EXPORT operator TopoDS_Edge() const;
Standard_EXPORT const TopoDS_Edge& Edge();
Standard_EXPORT operator TopoDS_Edge();
//! Returns the first vertex of the edge. May be Null.
Standard_EXPORT const TopoDS_Vertex& Vertex1() const;

View File

@@ -271,7 +271,7 @@ const TopoDS_Edge& BRepLib_MakePolygon::Edge()const
//purpose :
//=======================================================================
const TopoDS_Wire& BRepLib_MakePolygon::Wire()const
const TopoDS_Wire& BRepLib_MakePolygon::Wire()
{
return TopoDS::Wire(Shape());
}
@@ -291,7 +291,7 @@ BRepLib_MakePolygon::operator TopoDS_Edge() const
//purpose :
//=======================================================================
BRepLib_MakePolygon::operator TopoDS_Wire() const
BRepLib_MakePolygon::operator TopoDS_Wire()
{
return Wire();
}

View File

@@ -87,8 +87,8 @@ public:
Standard_EXPORT const TopoDS_Edge& Edge() const;
Standard_EXPORT operator TopoDS_Edge() const;
Standard_EXPORT const TopoDS_Wire& Wire() const;
Standard_EXPORT operator TopoDS_Wire() const;
Standard_EXPORT const TopoDS_Wire& Wire();
Standard_EXPORT operator TopoDS_Wire();

View File

@@ -43,7 +43,7 @@ void BRepLib_MakeShape::Build()
//purpose :
//=======================================================================
const TopoDS_Shape& BRepLib_MakeShape::Shape() const
const TopoDS_Shape& BRepLib_MakeShape::Shape()
{
if (!IsDone()) {
// the following is const cast away
@@ -59,7 +59,7 @@ const TopoDS_Shape& BRepLib_MakeShape::Shape() const
//purpose :
//=======================================================================
BRepLib_MakeShape::operator TopoDS_Shape() const
BRepLib_MakeShape::operator TopoDS_Shape()
{
return Shape();
}

View File

@@ -49,8 +49,8 @@ public:
//! may be redefined.
Standard_EXPORT void Build();
Standard_EXPORT const TopoDS_Shape& Shape() const;
Standard_EXPORT operator TopoDS_Shape() const;
Standard_EXPORT const TopoDS_Shape& Shape();
Standard_EXPORT operator TopoDS_Shape();
//! returns the status of the Face after
//! the shape creation.

View File

@@ -170,7 +170,7 @@ void BRepLib_MakeSolid::Add(const TopoDS_Shell& S)
//purpose :
//=======================================================================
const TopoDS_Solid& BRepLib_MakeSolid::Solid()const
const TopoDS_Solid& BRepLib_MakeSolid::Solid()
{
return TopoDS::Solid(Shape());
}
@@ -182,7 +182,7 @@ const TopoDS_Solid& BRepLib_MakeSolid::Solid()const
//purpose :
//=======================================================================
BRepLib_MakeSolid::operator TopoDS_Solid() const
BRepLib_MakeSolid::operator TopoDS_Solid()
{
return TopoDS::Solid(Shape());
}

View File

@@ -64,8 +64,8 @@ public:
Standard_EXPORT void Add (const TopoDS_Shell& S);
//! Returns the new Solid.
Standard_EXPORT const TopoDS_Solid& Solid() const;
Standard_EXPORT operator TopoDS_Solid() const;
Standard_EXPORT const TopoDS_Solid& Solid();
Standard_EXPORT operator TopoDS_Solid();
//! returns the status of the Face after
//! the shape creation.

View File

@@ -39,7 +39,7 @@ BRepLib_MakeVertex::BRepLib_MakeVertex(const gp_Pnt& P)
//purpose :
//=======================================================================
const TopoDS_Vertex& BRepLib_MakeVertex::Vertex()const
const TopoDS_Vertex& BRepLib_MakeVertex::Vertex()
{
return TopoDS::Vertex(Shape());
}
@@ -51,7 +51,7 @@ const TopoDS_Vertex& BRepLib_MakeVertex::Vertex()const
//=======================================================================
BRepLib_MakeVertex::operator TopoDS_Vertex() const
BRepLib_MakeVertex::operator TopoDS_Vertex()
{
return Vertex();
}

View File

@@ -36,8 +36,8 @@ public:
Standard_EXPORT BRepLib_MakeVertex(const gp_Pnt& P);
Standard_EXPORT const TopoDS_Vertex& Vertex() const;
Standard_EXPORT operator TopoDS_Vertex() const;
Standard_EXPORT const TopoDS_Vertex& Vertex();
Standard_EXPORT operator TopoDS_Vertex();

View File

@@ -396,7 +396,7 @@ void BRepLib_MakeWire::Add(const TopoDS_Edge& E)
//purpose :
//=======================================================================
const TopoDS_Wire& BRepLib_MakeWire::Wire()const
const TopoDS_Wire& BRepLib_MakeWire::Wire()
{
return TopoDS::Wire(Shape());
}
@@ -429,7 +429,7 @@ const TopoDS_Vertex& BRepLib_MakeWire::Vertex()const
//purpose :
//=======================================================================
BRepLib_MakeWire::operator TopoDS_Wire() const
BRepLib_MakeWire::operator TopoDS_Wire()
{
return Wire();
}

View File

@@ -117,8 +117,8 @@ public:
Standard_EXPORT BRepLib_WireError Error() const;
//! Returns the new wire.
Standard_EXPORT const TopoDS_Wire& Wire() const;
Standard_EXPORT operator TopoDS_Wire() const;
Standard_EXPORT const TopoDS_Wire& Wire();
Standard_EXPORT operator TopoDS_Wire();
//! Returns the last edge added to the wire.
Standard_EXPORT const TopoDS_Edge& Edge() const;