From 930150c7ee436eb17bd38338cd485710c53b728c Mon Sep 17 00:00:00 2001 From: Sylvain Pion Date: Sat, 25 Mar 2006 11:16:13 +0000 Subject: [PATCH] - Remove some warnings, and some useless point copies. --- .../include/CGAL/Delaunay_triangulation_2.h | 6 +++--- .../include/CGAL/Regular_triangulation_2.h | 4 ++-- Triangulation_2/include/CGAL/Triangulation_2.h | 16 +++++++--------- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h b/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h index 835a05f77d4..71772ff6efa 100644 --- a/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h @@ -420,11 +420,11 @@ dual(const Edge &e) const (dual(e.first),dual(e.first->neighbor(e.second))); return make_object(s); } - // one of the adjacent face is infinite + // one of the adjacent faces is infinite Face_handle f; int i; if (is_infinite(e.first)) { - f=e.first->neighbor(e.second); f->has_neighbor(e.first,i); - } + f=e.first->neighbor(e.second); i=f->index(e.first); + } else { f=e.first; i=e.second; } diff --git a/Triangulation_2/include/CGAL/Regular_triangulation_2.h b/Triangulation_2/include/CGAL/Regular_triangulation_2.h index 182e51289b3..f7f9b3fdf72 100644 --- a/Triangulation_2/include/CGAL/Regular_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Regular_triangulation_2.h @@ -975,10 +975,10 @@ dual(const Edge &e) const return make_object(s); } - // one of the adjacent face is infinite + // one of the adjacent faces is infinite Face_handle f; int i; if ( is_infinite(e.first)) { - f=e.first->neighbor(e.second); f->has_neighbor(e.first,i); + f=e.first->neighbor(e.second); i=f->index(e.first); } else { f=e.first; i=e.second; diff --git a/Triangulation_2/include/CGAL/Triangulation_2.h b/Triangulation_2/include/CGAL/Triangulation_2.h index f654e152a6d..63516fc3f5c 100644 --- a/Triangulation_2/include/CGAL/Triangulation_2.h +++ b/Triangulation_2/include/CGAL/Triangulation_2.h @@ -1406,11 +1406,9 @@ fill_hole_delaunay(std::list & first_hole) Vertex_handle v0 = ff->vertex(cw(ii)); Vertex_handle v1 = ff->vertex(ccw(ii)); Vertex_handle v2 = infinite_vertex(); + Vertex_handle v3; const Point& p0 = v0->point(); const Point& p1 = v1->point(); - Point p2; - Point p; - Vertex_handle vv; typename Hole::iterator hdone = hole.end(); hit = hole.begin(); @@ -1423,17 +1421,17 @@ fill_hole_delaunay(std::list & first_hole) while( hit != hdone) { fn = (*hit).first; in = (*hit).second; - vv = fn->vertex(ccw(in)); + Vertex_handle vv = fn->vertex(ccw(in)); if (is_infinite(vv)) { if(is_infinite(v2)) cut_after = hit; } else { // vv is a finite vertex - p = vv->point(); + const Point & p = vv->point(); if (orientation(p0,p1,p) == COUNTERCLOCKWISE) { - if(is_infinite(v2)) { v2=vv; p2=p; cut_after=hit;} + if (is_infinite(v2)) { v2=vv; v3=vv; cut_after=hit;} else{ - if( in_circle(p0,p1,p2,p) == ON_POSITIVE_SIDE){ - v2=vv; p2=p; cut_after=hit;} + if (in_circle(p0,p1,v3->point(),p) == ON_POSITIVE_SIDE){ + v2=vv; v3=vv; cut_after=hit;} } } } @@ -1441,7 +1439,7 @@ fill_hole_delaunay(std::list & first_hole) } // create new triangle and update adjacency relations - Face_handle newf; + Face_handle newf; //update the hole and push back in the Hole_List stack // if v2 belongs to the neighbor following or preceding *f