mirror of https://github.com/CGAL/cgal
object_cast -> assign : remove warning uninitialized variables (approved by RM)
This commit is contained in:
parent
7e00f2fa49
commit
ee8f225830
|
|
@ -81,13 +81,13 @@ public:
|
|||
Object obj = R().intersect_3_object()(s1, s2);
|
||||
// s1,s2 must intersect
|
||||
CGAL_kernel_precondition(!(obj.is_empty()));
|
||||
typename R::Circle_3 circle;
|
||||
typename R::Point_3 point;
|
||||
if(assign(circle, obj))
|
||||
base = Rep(circle.diametral_sphere(), circle.supporting_plane());
|
||||
const typename R::Circle_3* circle_ptr=object_cast<typename R::Circle_3>(&obj);
|
||||
if(circle_ptr!=NULL)
|
||||
base = Rep(circle_ptr->diametral_sphere(), circle_ptr->supporting_plane());
|
||||
else {
|
||||
assign(point, obj);
|
||||
CircleC3 circle = CircleC3(point, FT(0), Vector_3(FT(1),FT(0),FT(0)));
|
||||
const typename R::Point_3* point=object_cast<typename R::Point_3>(&obj);
|
||||
CGAL_kernel_precondition(point!=NULL);
|
||||
CircleC3 circle = CircleC3(*point, FT(0), Vector_3(FT(1),FT(0),FT(0)));
|
||||
base = Rep(circle.diametral_sphere(), circle.supporting_plane());
|
||||
}
|
||||
}
|
||||
|
|
@ -98,13 +98,13 @@ public:
|
|||
Object obj = R().intersect_3_object()(p, s);
|
||||
// s1,s2 must intersect
|
||||
CGAL_kernel_precondition(!(obj.is_empty()));
|
||||
typename R::Circle_3 circle;
|
||||
typename R::Point_3 point;
|
||||
if(assign(circle, obj))
|
||||
base = Rep(circle.diametral_sphere(), circle.supporting_plane());
|
||||
const typename R::Circle_3* circle_ptr=object_cast<typename R::Circle_3>(&obj);
|
||||
if(circle_ptr!=NULL)
|
||||
base = Rep(circle_ptr->diametral_sphere(), circle_ptr->supporting_plane());
|
||||
else {
|
||||
assign(point, obj);
|
||||
CircleC3 circle = CircleC3(point, FT(0), Vector_3(FT(1),FT(0),FT(0)));
|
||||
const typename R::Point_3* point=object_cast<typename R::Point_3>(&obj);
|
||||
CGAL_kernel_precondition(point!=NULL);
|
||||
CircleC3 circle = CircleC3(*point, FT(0), Vector_3(FT(1),FT(0),FT(0)));
|
||||
base = Rep(circle.diametral_sphere(), circle.supporting_plane());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue