mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0022885: Bugfix: else clause applies to the wrong if statement because of missing braces
This commit is contained in:
@@ -577,18 +577,21 @@ void Bnd_Box::Add (const gp_Dir& D)
|
||||
{
|
||||
Standard_Real DX,DY,DZ;
|
||||
D.Coord(DX,DY,DZ);
|
||||
if (Abs(DX) > gp::Resolution()) {
|
||||
if (DX > 0) OpenXmax();
|
||||
else OpenXmin();
|
||||
}
|
||||
if (Abs(DY) > gp::Resolution()) {
|
||||
if (DY > 0) OpenYmax();
|
||||
else OpenYmin();
|
||||
}
|
||||
if (Abs(DZ) > gp::Resolution()) {
|
||||
if (DZ > 0) OpenZmax();
|
||||
else OpenZmin();
|
||||
}
|
||||
|
||||
if (DX < -RealEpsilon())
|
||||
OpenXmin();
|
||||
else if (DX > RealEpsilon())
|
||||
OpenXmax();
|
||||
|
||||
if (DY < -RealEpsilon())
|
||||
OpenYmin();
|
||||
else if (DY > RealEpsilon())
|
||||
OpenYmax();
|
||||
|
||||
if (DZ < -RealEpsilon())
|
||||
OpenZmin();
|
||||
else if (DZ > RealEpsilon())
|
||||
OpenZmax();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -204,14 +204,16 @@ void Bnd_Box2d::Add (const gp_Dir2d& D)
|
||||
{
|
||||
Standard_Real DX = D.X();
|
||||
Standard_Real DY = D.Y();
|
||||
if (DX < 0)
|
||||
if (DX < - gp::Resolution()) OpenXmin();
|
||||
else
|
||||
if (DX > gp::Resolution()) OpenXmax();
|
||||
if (DY < 0)
|
||||
if (DY < - gp::Resolution()) OpenYmin();
|
||||
else
|
||||
if (DY > gp::Resolution()) OpenYmax();
|
||||
|
||||
if (DX < -RealEpsilon())
|
||||
OpenXmin();
|
||||
else if (DX > RealEpsilon())
|
||||
OpenXmax();
|
||||
|
||||
if (DY < -RealEpsilon())
|
||||
OpenYmin();
|
||||
else if (DY > RealEpsilon())
|
||||
OpenYmax();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
Reference in New Issue
Block a user