0027104: DownCast() cannot return null for mismatched handle
authorabv <abv@opencascade.com>
Mon, 25 Jan 2016 07:14:20 +0000 (10:14 +0300)
committerabv <abv@opencascade.com>
Sat, 20 Feb 2016 07:10:15 +0000 (10:10 +0300)
commita9dde4a31b9851bad5658aa34033a3f3ec9b2677
tree3ea65c6a53e8305e355f84fe9ac644bbdf1fa69f
parent5d351a0822c8ae17686643943eee163f7ab3b79f
0027104: DownCast() cannot return null for mismatched handle

Method DownCast() is made template, to be available only when argument is actually a pointer or handle to a base class.

For compatibility with existing code, method DownCast() that can be used for the same type, derived, or unrelated class (i.e. where there is no actual down casting) is still available, its use shall cause "deprecated" compiler warning.

OCCT code is updated to remove meaningless DownCast()s; a few places where DownCast() was used with argument of unrelated type are corrected.

DRAW command QAHandleCast is removed (it was useful only during redesign of handles).
65 files changed:
dox/dev_guides/upgrade/upgrade.md
src/AIS/AIS_AttributeFilter.cxx
src/AIS/AIS_InteractiveContext_1.cxx
src/AIS/AIS_LocalContext.cxx
src/BRepAlgo/BRepAlgo_NormalProjection.cxx
src/BRepFeat/BRepFeat_MakeLinearForm.cxx
src/BRepFeat/BRepFeat_MakeRevolutionForm.cxx
src/BRepFeat/BRepFeat_RibSlot.cxx
src/BRepFill/BRepFill_ACRLaw.cxx
src/BRepFill/BRepFill_Evolved.cxx
src/BinTObjDrivers/BinTObjDrivers_ReferenceDriver.cxx
src/ChFi2d/ChFi2d_Builder.cxx
src/ChFi2d/ChFi2d_Builder_0.cxx
src/DDocStd/DDocStd.cxx
src/DDocStd/DDocStd_DrawDocument.cxx
src/DrawDim/DrawDim_PlanarDistance.cxx
src/Geom/Geom_OffsetSurface.cxx
src/Geom/Geom_RectangularTrimmedSurface.cxx
src/Geom2dConvert/Geom2dConvert.cxx
src/GeomAdaptor/GeomAdaptor_Surface.cxx
src/GeomConvert/GeomConvert.cxx
src/GeomPlate/GeomPlate_BuildPlateSurface.cxx
src/GeomliteTest/GeomliteTest_CurveCommands.cxx
src/IGESAppli/IGESAppli_Node.cxx
src/IGESControl/IGESControl_IGESBoundary.cxx
src/IGESSelect/IGESSelect.cxx
src/IGESToBRep/IGESToBRep_IGESBoundary.cxx
src/IVtkDraw/IVtkDraw_HighlightAndSelectionPipeline.cxx
src/IntPatch/IntPatch_Intersection.cxx
src/MAT2d/MAT2d_Tool2d.cxx
src/Message/Message_Messenger.cxx
src/QABugs/QABugs_PresentableObject.cxx
src/QANCollection/QANCollection_Handle.cxx
src/RWStepGeom/RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve.cxx
src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx
src/STEPCAFControl/STEPCAFControl_Reader.cxx
src/STEPCAFControl/STEPCAFControl_Writer.cxx
src/STEPSelections/STEPSelections_Counter.cxx
src/STEPSelections/STEPSelections_SelectInstances.cxx
src/SelectMgr/SelectMgr_SelectionManager.cxx
src/ShapeBuild/ShapeBuild_Edge.cxx
src/ShapeConstruct/ShapeConstruct.cxx
src/ShapeCustom/ShapeCustom_BSplineRestriction.cxx
src/ShapeFix/ShapeFix_Face.cxx
src/ShapeFix/ShapeFix_Shape.cxx
src/ShapeFix/ShapeFix_Wire.cxx
src/ShapeProcess/ShapeProcess_OperLibrary.cxx
src/ShapeUpgrade/ShapeUpgrade_ConvertCurve2dToBezier.cxx
src/ShapeUpgrade/ShapeUpgrade_ConvertCurve3dToBezier.cxx
src/ShapeUpgrade/ShapeUpgrade_SplitSurface.cxx
src/Standard/Standard_Handle.hxx
src/StdObjMgt/StdObjMgt_ReadData.hxx
src/StdSelect/StdSelect_ViewerSelector3d.cxx
src/StepAP209/StepAP209_Construct.cxx
src/StepToGeom/StepToGeom.cxx
src/StepToGeom/StepToGeom_MakeBSplineCurve.pxx
src/TCollection/TCollection_HExtendedString.cxx
src/TObj/TObj_Object.cxx
src/TObj/TObj_TReference.cxx
src/TestTopOpe/TestTopOpe_HDSCommands.cxx
src/TestTopOpeDraw/TestTopOpeDraw_Displayer.cxx
src/ViewerTest/ViewerTest.cxx
src/VrmlData/VrmlData_Scene.cxx
src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx
src/XmlTObjDrivers/XmlTObjDrivers_ReferenceDriver.cxx