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);
|
Object obj = R().intersect_3_object()(s1, s2);
|
||||||
// s1,s2 must intersect
|
// s1,s2 must intersect
|
||||||
CGAL_kernel_precondition(!(obj.is_empty()));
|
CGAL_kernel_precondition(!(obj.is_empty()));
|
||||||
typename R::Circle_3 circle;
|
const typename R::Circle_3* circle_ptr=object_cast<typename R::Circle_3>(&obj);
|
||||||
typename R::Point_3 point;
|
if(circle_ptr!=NULL)
|
||||||
if(assign(circle, obj))
|
base = Rep(circle_ptr->diametral_sphere(), circle_ptr->supporting_plane());
|
||||||
base = Rep(circle.diametral_sphere(), circle.supporting_plane());
|
|
||||||
else {
|
else {
|
||||||
assign(point, obj);
|
const typename R::Point_3* point=object_cast<typename R::Point_3>(&obj);
|
||||||
CircleC3 circle = CircleC3(point, FT(0), Vector_3(FT(1),FT(0),FT(0)));
|
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());
|
base = Rep(circle.diametral_sphere(), circle.supporting_plane());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -98,13 +98,13 @@ public:
|
||||||
Object obj = R().intersect_3_object()(p, s);
|
Object obj = R().intersect_3_object()(p, s);
|
||||||
// s1,s2 must intersect
|
// s1,s2 must intersect
|
||||||
CGAL_kernel_precondition(!(obj.is_empty()));
|
CGAL_kernel_precondition(!(obj.is_empty()));
|
||||||
typename R::Circle_3 circle;
|
const typename R::Circle_3* circle_ptr=object_cast<typename R::Circle_3>(&obj);
|
||||||
typename R::Point_3 point;
|
if(circle_ptr!=NULL)
|
||||||
if(assign(circle, obj))
|
base = Rep(circle_ptr->diametral_sphere(), circle_ptr->supporting_plane());
|
||||||
base = Rep(circle.diametral_sphere(), circle.supporting_plane());
|
|
||||||
else {
|
else {
|
||||||
assign(point, obj);
|
const typename R::Point_3* point=object_cast<typename R::Point_3>(&obj);
|
||||||
CircleC3 circle = CircleC3(point, FT(0), Vector_3(FT(1),FT(0),FT(0)));
|
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());
|
base = Rep(circle.diametral_sphere(), circle.supporting_plane());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue