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

0024023: Revamp the OCCT Handle -- downcast (automatic)

Automatic update by command "occt_upgrade . -downcast"

C-style cast of Handle to that of derived type (now illegal) is replaced by call to DownCast()
Const reference local variables of Handle type initialized by result of DownCast are replaced by normal variables.
This commit is contained in:
abv
2015-07-02 16:41:05 +03:00
parent ce8b059af3
commit c5f3a42524
158 changed files with 863 additions and 888 deletions

View File

@@ -1621,7 +1621,7 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)&
IntPatch_IType aType = aSLine->ArcType();
if( aType != IntPatch_Walking)
continue;
const Handle(IntPatch_WLine)& aWLine = (*((Handle(IntPatch_WLine)*)&aSLine));
Handle(IntPatch_WLine) aWLine (Handle(IntPatch_WLine)::DownCast (aSLine));
Standard_Integer tnbV = aWLine->NbVertex();
Standard_Integer tiV;
for( tiV = 1; tiV <= tnbV; tiV++ ) {
@@ -1645,7 +1645,7 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)&
if( VDMin != 0 ) {
const Handle(IntPatch_Line)& aSLine = SLin.Value(WLDMin);
const Handle(IntPatch_WLine)& aWLine = (*((Handle(IntPatch_WLine)*)&aSLine));
Handle(IntPatch_WLine) aWLine (Handle(IntPatch_WLine)::DownCast (aSLine));
Standard_Integer tiVpar = (Standard_Integer)aWLine->Vertex(VDMin).ParameterOnLine();
Standard_Integer ciVpar = (Standard_Integer)wline->Vertex(ciV).ParameterOnLine();
Standard_Real u11 = 0., u12 = 0., v11 = 0., v12 = 0.;
@@ -2441,7 +2441,7 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& Sur
IntPatch_IType aType = aSLine->ArcType();
if( aType != IntPatch_Walking)
continue;
const Handle(IntPatch_WLine)& aWLine = (*((Handle(IntPatch_WLine)*)&aSLine));
Handle(IntPatch_WLine) aWLine (Handle(IntPatch_WLine)::DownCast (aSLine));
Standard_Integer tnbV = aWLine->NbVertex();
Standard_Integer tiV;
for( tiV = 1; tiV <= tnbV; tiV++ )
@@ -2469,7 +2469,7 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& Sur
if( VDMin != 0 )
{
const Handle(IntPatch_Line)& aSLine = SLin.Value(WLDMin);
const Handle(IntPatch_WLine)& aWLine = (*((Handle(IntPatch_WLine)*)&aSLine));
Handle(IntPatch_WLine) aWLine (Handle(IntPatch_WLine)::DownCast (aSLine));
Standard_Integer tiVpar = (Standard_Integer)aWLine->Vertex(VDMin).ParameterOnLine();
Standard_Integer ciVpar = (Standard_Integer)wline->Vertex(ciV).ParameterOnLine();
Standard_Real u11 = 0., u12 = 0., v11 = 0., v12 = 0.;