Archived issue #0024508
Suspect shadowed variable in BRepFeat_MakeLinearForm.cxx
Description
Hello,
Lines 314-336 look like (Sliding is of type Standard_Boolean):
if(Sliding) {
Standard_Boolean Sliding = Standard_False;
Handle(Geom_Surface) s = BRep_Tool::Surface(FirstFace);
if (s->DynamicType() ==
STANDARD_TYPE(Geom_RectangularTrimmedSurface)) {
s = Handle(Geom_RectangularTrimmedSurface)::
DownCast(s)->BasisSurface();
}
if(s->DynamicType() == STANDARD_TYPE(Geom_Plane) ||
s->DynamicType() == STANDARD_TYPE(Geom_CylindricalSurface)) {
// if plane or cylinder : sliding is possible
Sliding = Standard_True;
}
}
if(Sliding) {
...
But another Sliding variable is defined in the inner scope, and thus it is not modified in the outer scope.
Lines 314-336 look like (Sliding is of type Standard_Boolean):
if(Sliding) {
Standard_Boolean Sliding = Standard_False;
Handle(Geom_Surface) s = BRep_Tool::Surface(FirstFace);
if (s->DynamicType() ==
STANDARD_TYPE(Geom_RectangularTrimmedSurface)) {
s = Handle(Geom_RectangularTrimmedSurface)::
DownCast(s)->BasisSurface();
}
if(s->DynamicType() == STANDARD_TYPE(Geom_Plane) ||
s->DynamicType() == STANDARD_TYPE(Geom_CylindricalSurface)) {
// if plane or cylinder : sliding is possible
Sliding = Standard_True;
}
}
if(Sliding) {
...
But another Sliding variable is defined in the inner scope, and thus it is not modified in the outer scope.
Public activity
1 archived note
Participants are labeled by their role within this record.
Fixed by #0025734
Related records