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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user