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

0029164: GCC 7.1 compiler warnings -Wmaybe-uninitialized in gp_XYZ and siblings

Code is corrected to avoid local variables of reference type pointing to fields of temporary objects.
This commit is contained in:
abv
2017-09-29 18:35:03 +03:00
committed by bugmaster
parent b1811c1d2b
commit 9b372aa8ba
5 changed files with 19 additions and 16 deletions

View File

@@ -47,9 +47,9 @@ static
Standard_Real GetAddToParam(const gp_Lin& L,const Standard_Real P,const Bnd_Box& B);
//gets transition of line <L> passing through/near the edge <e> of faces <f1>, <f2>. <param> is
// a parameter on the edge where the minimum distance between <l> and <e> was found
static Standard_Integer GetTransi(const TopoDS_Face& f1, const TopoDS_Face& f2, const TopoDS_Edge e,
Standard_Real param, const Geom_Line& L, IntCurveSurface_TransitionOnCurve& trans);
// a parameter on the edge where the minimum distance between <l> and <e> was found
static Standard_Integer GetTransi(const TopoDS_Face& f1, const TopoDS_Face& f2, const TopoDS_Edge e,
Standard_Real param, const gp_Lin& L, IntCurveSurface_TransitionOnCurve& trans);
static Standard_Boolean GetNormalOnFaceBound(const TopoDS_Edge& E, const TopoDS_Face& F, Standard_Real param, gp_Dir& OutDir);
@@ -560,7 +560,7 @@ static Standard_Integer GetTransi(const TopoDS_Face& f1,
const TopoDS_Face& f2,
const TopoDS_Edge e,
const Standard_Real param,
const Geom_Line& L,
const gp_Lin& L,
IntCurveSurface_TransitionOnCurve& trans)
{
//return statuses:
@@ -573,7 +573,7 @@ static Standard_Integer GetTransi(const TopoDS_Face& f1,
if (!GetNormalOnFaceBound(e, f2, param, nf2))
return -1;
const gp_Dir& LDir = L.Lin().Direction();
const gp_Dir& LDir = L.Direction();
if(Abs(LDir.Dot(nf1)) < Precision::Angular() || Abs(LDir.Dot(nf2)) < Precision::Angular())
{
@@ -627,4 +627,4 @@ static void Trans(const Standard_Real parmin,
state = 3; // IN
else
state = 4; // OUT
}
}