object_cast -> assign : remove warning uninitialized variables (approved by RM)

This commit is contained in:
Sébastien Loriot 2009-07-09 08:38:56 +00:00
parent 7e00f2fa49
commit ee8f225830
1 changed files with 12 additions and 12 deletions

View File

@ -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());
}
}