int -> size_t and the other way round for level as it cannot get that big

This commit is contained in:
Andreas Fabri 2010-06-22 10:15:50 +00:00
parent e25cf87233
commit a8ffcea556
2 changed files with 9 additions and 9 deletions

View File

@ -252,7 +252,7 @@ typename Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::Vertex_handle
Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>:: Segment_Delaunay_graph_2<Gt,ST,D_S,LTag>::
insert_point(const Storage_site_2& ss, const Point_2& p, Vertex_handle vnear) insert_point(const Storage_site_2& ss, const Point_2& p, Vertex_handle vnear)
{ {
int n = number_of_vertices(); size_type n = number_of_vertices();
if ( n == 0 ) { if ( n == 0 ) {
return insert_first(ss, p); return insert_first(ss, p);
} else if ( n == 1 ) { } else if ( n == 1 ) {
@ -2040,7 +2040,7 @@ remove_degree_d_vertex(const Vertex_handle& v)
#else #else
minimize_degree(v); minimize_degree(v);
int deg = degree(v); size_type deg = degree(v);
if ( deg == 3 ) { if ( deg == 3 ) {
remove_degree_3(v); remove_degree_3(v);
return; return;
@ -2144,7 +2144,7 @@ remove_base(const Vertex_handle& v)
return remove_third(v); return remove_third(v);
} }
int deg = degree(v); size_type deg = degree(v);
if ( deg == 2 ) { if ( deg == 2 ) {
remove_degree_2(v); remove_degree_2(v);
} else if ( deg == 3 ) { } else if ( deg == 3 ) {
@ -3121,8 +3121,8 @@ file_output(std::ostream& os, Point_handle_mapper& P,
} }
} }
std::map<Vertex_handle,int> V; std::map<Vertex_handle,size_type> V;
std::map<Face_handle,int> F; std::map<Face_handle,size_type> F;
// first vertex (infinite vertex) // first vertex (infinite vertex)
size_type inum = 0; size_type inum = 0;

View File

@ -445,9 +445,9 @@ protected:
return (std::min)(die(), (int)sdg_hierarchy_2__maxlevel)-1; return (std::min)(die(), (int)sdg_hierarchy_2__maxlevel)-1;
} }
size_type find_level(Vertex_handle v) const { int find_level(Vertex_handle v) const {
CGAL_precondition( v != Vertex_handle() ); CGAL_precondition( v != Vertex_handle() );
size_type level = 0; int level = 0;
Vertex_handle vertex = v; Vertex_handle vertex = v;
while ( vertex->up() != Vertex_handle() ) { while ( vertex->up() != Vertex_handle() ) {
vertex = vertex->up(); vertex = vertex->up();
@ -458,11 +458,11 @@ protected:
} }
Vertex_handle Vertex_handle
vertex_at_level(const Vertex_handle& v, size_type k) const vertex_at_level(const Vertex_handle& v, int k) const
{ {
CGAL_precondition( k <= sdg_hierarchy_2__maxlevel ); CGAL_precondition( k <= sdg_hierarchy_2__maxlevel );
size_type level = 0; int level = 0;
Vertex_handle v_at_level = v; Vertex_handle v_at_level = v;
while ( level < k ) { while ( level < k ) {
v_at_level = v_at_level->up(); v_at_level = v_at_level->up();