- it++ -> ++it for efficiency.

This commit is contained in:
Sylvain Pion 2001-02-09 16:41:05 +00:00
parent 45b0c0d7f0
commit d73961f43b
3 changed files with 22 additions and 25 deletions

View File

@ -1,14 +1,14 @@
#ifndef CGAL_DELAUNAY_REMOVE_TDS_3_H
#define CGAL_DELAUNAY_REMOVE_TDS_3_H 1
#ifndef CGAL_BASIC_H
#define CGAL_DELAUNAY_REMOVE_TDS_3_H
#include <CGAL/basic.h>
#endif
#include <map>
#include <CGAL/quadruple.h>
#include <CGAL/Triangulation_face_base_2.h>
#include <CGAL/Triangulation_data_structure_using_list_2.h>
CGAL_BEGIN_NAMESPACE
// Instead of deriving from Triangulation_vertex_base_2<Gt> we copy the code
@ -259,7 +259,7 @@ public:
for(Facet_iterator fit = boundhole.begin() ;
fit != boundhole.end();
fit++) {
++fit) {
Face_3_2 * f = create_face();
Facet facet = *fit;
@ -335,9 +335,9 @@ public:
for(std::vector<Halfedge>::iterator it = halfedges.begin();
it != halfedges.end();
it++) {
++it) {
Halfedge e1 = *it;
it++;
++it;
Halfedge e2 = *it;
e1.third->set_neighbor(e1.fourth, e2.third);
e2.third->set_neighbor(e2.fourth, e1.third);
@ -350,7 +350,7 @@ public:
Face_3_2 *f = dummy;
for( Face_iterator fit = faces_begin(); fit != faces_end(); fit++) {
for( Face_iterator fit = faces_begin(); fit != faces_end(); ++fit) {
f->set_n(&(*fit));
fit->set_p(f);
f = &(*fit);
@ -363,11 +363,8 @@ public:
((Face_3_2*)dummy->n())->set_p(f);
delete(dummy);
}
};
CGAL_END_NAMESPACE
#endif // CGAL_DELAUNAY_REMOVE_TDS_3_H //
// EOF //
#endif // CGAL_DELAUNAY_REMOVE_TDS_3_H

View File

@ -452,14 +452,14 @@ undo_make_hole_3D(std::list<Facet> & outside,
{
std::list<Facet>::iterator cit = inside.begin();
for(std::list<Facet>::iterator fit = outside.begin(); fit != outside.end();
fit++) {
++fit) {
Cell_handle ch = (*fit).first;
ch->set_neighbor((*fit).second, (*cit).first);
CGAL_triangulation_assertion( (*cit).first->neighbor((*cit).second) == ch);
for(int i = 0; i < 4; i++)
ch->vertex(i)->set_cell(ch);
cit++;
++cit;
}
}
@ -470,7 +470,7 @@ Delaunay_triangulation_3<Gt,Tds>::
delete_cells(std::list<Cell_handle> & hole, int /*dummy_for_windows*/)
{
for(std::list<Cell_handle>::iterator cit = hole.begin(); cit != hole.end();
cit++)
++cit)
_tds.delete_cell( &*(*cit) );
}
@ -479,7 +479,7 @@ void
Delaunay_triangulation_3<Gt,Tds>::
delete_cells(std::list<Facet> & hole)
{
for(std::list<Facet>::iterator cit = hole.begin(); cit != hole.end(); cit++)
for(std::list<Facet>::iterator cit = hole.begin(); cit != hole.end(); ++cit)
_tds.delete_cell( &*((*cit).first) );
}
@ -1556,10 +1556,10 @@ undo_make_hole_3D_ear(std::list<Facet> & boundhole,
std::list<Cell_handle>::iterator cit = hole.begin();
for(std::list<Facet>::iterator fit = boundhole.begin();
fit != boundhole.end();
fit++) {
++fit) {
Cell_handle ch = (*fit).first;
ch->set_neighbor((*fit).second, *cit);
cit++;
++cit;
// the vertices on the boundary of the hole still
// point to the cells that form the boundary of the hole
}
@ -1638,8 +1638,8 @@ fill_hole_3D_ear( std::list<Facet> & boundhole)
bool on_unbounded_side = false;
// we now look at all vertices that are on the boundary of the hole
for(Surface::Vertex_iterator vit = surface.vertices_begin();
(vit != surface.vertices_end());
vit++) {
vit != surface.vertices_end();
++vit) {
Vertex *v = (*vit).info();
if( (! is_infinite(Vertex_handle(v)))
&& (v != v0) && (v != v1) && (v != v2) && (v != v3)) {
@ -1703,7 +1703,7 @@ fill_hole_3D_ear( std::list<Facet> & boundhole)
for(std::set<Vertex_3_2*>::iterator it = cospheric_vertices.begin();
it != cospheric_vertices.end();
it++) {
++it) {
const Point & pit = (*it)->info()->point();
Vertex_circulator_3_2 vc = (*it)->incident_vertices();
Vertex_circulator_3_2 done = vc;

View File

@ -944,7 +944,7 @@ operator<< (std::ostream& os, const Triangulation_3<GT, Tds> &tr)
// the infinite vertex is numbered 0
int i = 1;
for(Vertex_iterator it=tr.all_vertices_begin(); it!=tr.vertices_end(); it++)
for(Vertex_iterator it=tr.all_vertices_begin(); it!=tr.vertices_end(); ++it)
if ( (&(*it)) != &(*(tr.infinite_vertex())) ) {
V[&(*it)] = i++;
os << *it; // uses the << operator of Vertex
@ -961,19 +961,19 @@ operator<< (std::ostream& os, const Triangulation_3<GT, Tds> &tr)
switch ( tr.dimension() ) {
case 3:
{
for(Cell_iterator it=tr.all_cells_begin(); it != tr.cells_end(); it++)
for(Cell_iterator it=tr.all_cells_begin(); it != tr.cells_end(); ++it)
os << *it; // other information
break;
}
case 2:
{
for(Facet_iterator it=tr.all_facets_begin(); it != tr.facets_end(); it++)
for(Facet_iterator it=tr.all_facets_begin(); it != tr.facets_end(); ++it)
os << *((*it).first); // other information
break;
}
case 1:
{
for(Edge_iterator it=tr.all_edges_begin(); it != tr.edges_end(); it++)
for(Edge_iterator it=tr.all_edges_begin(); it != tr.edges_end(); ++it)
os << *((*it).first); // other information
break;
}