mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0029997: Coding Rules - eliminate GCC compiler warnings -Wmaybe-uninitialized in Select3D_InteriorSensitivePointSet.cxx
This commit is contained in:
parent
73a7509fde
commit
39b7b2a465
@ -238,11 +238,9 @@ Select3D_BndBox3d Select3D_InteriorSensitivePointSet::Box (const Standard_Intege
|
|||||||
Standard_Real Select3D_InteriorSensitivePointSet::Center (const Standard_Integer theIdx,
|
Standard_Real Select3D_InteriorSensitivePointSet::Center (const Standard_Integer theIdx,
|
||||||
const Standard_Integer theAxis) const
|
const Standard_Integer theAxis) const
|
||||||
{
|
{
|
||||||
Standard_Integer aPolygIdx = myPolygonsIdxs->Value (theIdx);
|
const Standard_Integer aPolygIdx = myPolygonsIdxs->Value (theIdx);
|
||||||
const gp_XYZ& aCOG = myPlanarPolygons.Value (aPolygIdx)->CenterOfGeometry().XYZ();
|
const gp_Pnt aCOG = myPlanarPolygons.Value (aPolygIdx)->CenterOfGeometry();
|
||||||
Standard_Real aCenter = theAxis == 0 ? aCOG.X() : (theAxis == 1 ? aCOG.Y() : aCOG.Z());
|
return aCOG.Coord (theAxis - 1);
|
||||||
|
|
||||||
return aCenter;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
Loading…
x
Reference in New Issue
Block a user