Add static_cast<double>(size_t)

This commit is contained in:
Andreas Fabri 2010-06-25 08:36:22 +00:00
parent 9c90032656
commit bcf1591719
2 changed files with 4 additions and 4 deletions

View File

@ -28,7 +28,7 @@ void create_center_vertex( Polyhedron& P, Facet_iterator f) {
++ order; ++ order;
} while ( ++h != f->facet_begin()); } while ( ++h != f->facet_begin());
CGAL_assertion( order >= 3); // guaranteed by definition of polyhedron CGAL_assertion( order >= 3); // guaranteed by definition of polyhedron
Point center = CGAL::ORIGIN + (vec / order); Point center = CGAL::ORIGIN + (vec / static_cast<double>(order));
Halfedge_handle new_center = P.create_center_vertex( f->halfedge()); Halfedge_handle new_center = P.create_center_vertex( f->halfedge());
new_center->vertex()->point() = center; new_center->vertex()->point() = center;
} }
@ -42,7 +42,7 @@ struct Smooth_old_vertex {
HV_circulator h = v.vertex_begin(); HV_circulator h = v.vertex_begin();
do { do {
vec = vec + ( h->opposite()->vertex()->point() - CGAL::ORIGIN) vec = vec + ( h->opposite()->vertex()->point() - CGAL::ORIGIN)
* alpha / degree; * alpha / static_cast<double>(degree);
++ h; ++ h;
CGAL_assertion( h != v.vertex_begin()); // even degree guaranteed CGAL_assertion( h != v.vertex_begin()); // even degree guaranteed
++ h; ++ h;

View File

@ -30,7 +30,7 @@ void create_center_vertex( Polyhedron& P, Facet_iterator f) {
++ order; ++ order;
} while ( ++h != f->facet_begin()); } while ( ++h != f->facet_begin());
CGAL_assertion( order >= 3); // guaranteed by definition of polyhedron CGAL_assertion( order >= 3); // guaranteed by definition of polyhedron
Point center = CGAL::ORIGIN + (vec / order); Point center = CGAL::ORIGIN + (vec / static_cast<double>(order));
Halfedge_handle new_center = P.create_center_vertex( f->halfedge()); Halfedge_handle new_center = P.create_center_vertex( f->halfedge());
new_center->vertex()->point() = center; new_center->vertex()->point() = center;
} }
@ -53,7 +53,7 @@ struct Smooth_old_vertex {
return v.point(); return v.point();
} }
vec = vec + ( h->opposite()->vertex()->point() - CGAL::ORIGIN) vec = vec + ( h->opposite()->vertex()->point() - CGAL::ORIGIN)
* alpha / degree; * alpha / static_cast<double>(degree);
++ h; ++ h;
CGAL_assertion( h != v.vertex_begin()); // even degree guaranteed CGAL_assertion( h != v.vertex_begin()); // even degree guaranteed
++ h; ++ h;