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

@@ -639,8 +639,8 @@ void AIS_EqualDistanceRelation::ComputeTwoVerticesLength( const Handle( Prs3d_Pr
curpos.Translate(offset);
Position = curpos;
}
else {
const gp_Dir& aDir = Plane->Pln().Axis().Direction();
else {
gp_Dir aDir = Plane->Pln().Axis().Direction();
gp_Vec aVec (aDir.XYZ()*10*ArrowSize);
//Position = gp_Pnt(FirstAttach.XYZ()+gp_XYZ(1.,1.,1.)); // not correct
Position = FirstAttach.Translated(aVec);