diff --git a/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h b/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h index 4e0a84dab68..1757dfd565a 100644 --- a/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h +++ b/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h @@ -667,7 +667,7 @@ public: const Vertex_handle& old_vertex, const SliverCriterion& criterion, OutputIterator modified_vertices, - bool *p_could_lock_zone = 0); + bool *could_lock_zone = NULL); /** @brief tries to move \c old_vertex to \c new_position in the mesh * @@ -681,7 +681,7 @@ public: const Vertex_handle& old_vertex, const SliverCriterion& criterion, OutputIterator modified_vertices, - bool *p_could_lock_zone = 0); + bool *could_lock_zone = NULL); /** * Updates mesh moving vertex \c old_vertex to \c new_position. Returns the @@ -746,7 +746,7 @@ public: * Moves \c old_vertex to \c new_position * Stores the cells which have to be updated in \c outdated_cells * Updates the Vertex_handle old_vertex to its new value in \c moving_vertices - * The second one (with the p_could_lock_zone param) is for the parallel version + * The second one (with the could_lock_zone param) is for the parallel version */ Vertex_handle move_point(const Vertex_handle& old_vertex, const Point_3& new_position, @@ -756,7 +756,7 @@ public: const Point_3& new_position, Outdated_cell_set& outdated_cells_set, Moving_vertices_set& moving_vertices, - bool *p_could_lock_zone); + bool *could_lock_zone); /** * Try to lock the incident cells and return them in \c cells @@ -1311,7 +1311,7 @@ private: move_point_topo_change(const Vertex_handle& old_vertex, const Point_3& new_position, Outdated_cell_set& outdated_cells_set, - bool *p_could_lock_zone = 0); + bool *could_lock_zone = NULL); template < typename OutdatedCellsOutputIterator, typename DeletedCellsOutputIterator > @@ -1426,7 +1426,7 @@ private: CellsOutputIterator insertion_conflict_cells, FacetsOutputIterator insertion_conflict_boundary, CellsOutputIterator removal_conflict_cells, - bool *p_could_lock_zone = 0) const; + bool *could_lock_zone = NULL) const; template < typename ConflictCellsInputIterator, @@ -1960,14 +1960,14 @@ update_mesh(const Point_3& new_position, const Vertex_handle& old_vertex, const SliverCriterion& criterion, OutputIterator modified_vertices, - bool *p_could_lock_zone) + bool *could_lock_zone) { // std::cerr << "\nupdate_mesh[v1](" << new_position << ",\n" // << " " << (void*)(&*old_vertex) << "=" << old_vertex->point() // << ")\n"; - if (p_could_lock_zone) - *p_could_lock_zone = true; + if (could_lock_zone) + *could_lock_zone = true; Cell_vector incident_cells_; incident_cells_.reserve(64); @@ -1991,7 +1991,7 @@ update_mesh(const Point_3& new_position, old_vertex, criterion, modified_vertices, - p_could_lock_zone); + could_lock_zone); } } @@ -2048,7 +2048,7 @@ update_mesh_topo_change(const Point_3& new_position, const Vertex_handle& old_vertex, const SliverCriterion& criterion, OutputIterator modified_vertices, - bool *p_could_lock_zone) + bool *could_lock_zone) { // check_c3t3(c3t3_); // std::cerr << "\n" @@ -2063,9 +2063,9 @@ update_mesh_topo_change(const Point_3& new_position, std::inserter(insertion_conflict_cells,insertion_conflict_cells.end()), std::back_inserter(insertion_conflict_boundary), std::inserter(removal_conflict_cells, removal_conflict_cells.end()), - p_could_lock_zone); + could_lock_zone); - if (p_could_lock_zone && *p_could_lock_zone == false) + if (could_lock_zone && *could_lock_zone == false) return std::make_pair(false, Vertex_handle()); if(insertion_conflict_boundary.empty()) @@ -2506,14 +2506,14 @@ move_point(const Vertex_handle& old_vertex, const Point_3& new_position, Outdated_cell_set& outdated_cells_set, Moving_vertices_set& moving_vertices, - bool *p_could_lock_zone) + bool *could_lock_zone) { - CGAL_assertion(p_could_lock_zone != 0); - *p_could_lock_zone = true; + CGAL_assertion(could_lock_zone != NULL); + *could_lock_zone = true; if (!try_lock_vertex(old_vertex)) // LOCK { - *p_could_lock_zone = false; + *could_lock_zone = false; this->unlock_all_elements(); return Vertex_handle(); } @@ -2523,14 +2523,14 @@ move_point(const Vertex_handle& old_vertex, incident_cells_.reserve(64); if (try_lock_and_get_incident_cells(old_vertex, incident_cells_) == false) { - *p_could_lock_zone = false; + *could_lock_zone = false; return Vertex_handle(); } //======= /Get incident cells ========== if (!try_lock_point(new_position)) // LOCK { - *p_could_lock_zone = false; + *could_lock_zone = false; this->unlock_all_elements(); return Vertex_handle(); } @@ -2558,9 +2558,9 @@ move_point(const Vertex_handle& old_vertex, Vertex_handle new_vertex = move_point_topo_change(old_vertex, new_position, outdated_cells_set, - p_could_lock_zone); + could_lock_zone); - if (*p_could_lock_zone == false) + if (*could_lock_zone == false) { this->unlock_all_elements(); return Vertex_handle(); @@ -2583,7 +2583,7 @@ C3T3_helpers:: move_point_topo_change(const Vertex_handle& old_vertex, const Point_3& new_position, Outdated_cell_set& outdated_cells_set, - bool *p_could_lock_zone) + bool *could_lock_zone) { Cell_set insertion_conflict_cells; Cell_set removal_conflict_cells; @@ -2594,9 +2594,9 @@ move_point_topo_change(const Vertex_handle& old_vertex, std::inserter(insertion_conflict_cells,insertion_conflict_cells.end()), std::back_inserter(insertion_conflict_boundary), std::inserter(removal_conflict_cells, removal_conflict_cells.end()), - p_could_lock_zone); + could_lock_zone); - if (p_could_lock_zone && *p_could_lock_zone == false) + if (could_lock_zone && *could_lock_zone == false) return Vertex_handle(); this->lock_outdated_cells(); @@ -3331,7 +3331,7 @@ get_conflict_zone_topo_change(const Vertex_handle& v, CellsOutputIterator insertion_conflict_cells, FacetsOutputIterator insertion_conflict_boundary, CellsOutputIterator removal_conflict_cells, - bool *p_could_lock_zone) const + bool *could_lock_zone) const { // Get triangulation_vertex incident cells : removal conflict zone // CJTODO: hasn't it already been computed in "perturb_vertex" (when getting the slivers)? @@ -3342,9 +3342,9 @@ get_conflict_zone_topo_change(const Vertex_handle& v, int lj=0; typename Tr::Locate_type lt; Cell_handle cell = tr_.locate( - conflict_point, lt, li, lj, v->cell(), p_could_lock_zone); + conflict_point, lt, li, lj, v->cell(), could_lock_zone); - if (p_could_lock_zone && *p_could_lock_zone == false) + if (could_lock_zone && *could_lock_zone == false) return; if ( lt == Tr::VERTEX ) // Vertex removal is forbidden @@ -3355,7 +3355,7 @@ get_conflict_zone_topo_change(const Vertex_handle& v, cell, insertion_conflict_boundary, insertion_conflict_cells, - p_could_lock_zone); + could_lock_zone); } template diff --git a/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h b/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h index 00c95163a7d..42c2ef06e6f 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h +++ b/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h @@ -589,7 +589,7 @@ private: , const FT& sliver_bound , Visitor& visitor , Bad_vertices_vector &bad_vertices - , bool *p_could_lock_zone + , bool *could_lock_zone ) const; /** @@ -1216,7 +1216,7 @@ perturb_vertex( PVertex pv , const FT& sliver_bound , Visitor& visitor , Bad_vertices_vector &bad_vertices - , bool *p_could_lock_zone + , bool *could_lock_zone ) const { #ifdef CGAL_CONCURRENT_MESH_3_PROFILING @@ -1224,7 +1224,7 @@ perturb_vertex( PVertex pv "early withdrawals / late withdrawals / successes [Perturber]"); #endif - *p_could_lock_zone = true; + *could_lock_zone = true; // Zombie? if (pv.is_zombie()) @@ -1238,7 +1238,7 @@ perturb_vertex( PVertex pv #ifdef CGAL_CONCURRENT_MESH_3_PROFILING bcounter.increment_branch_2(); // THIS is an early withdrawal! #endif - *p_could_lock_zone = false; + *could_lock_zone = false; return; } @@ -1257,7 +1257,7 @@ perturb_vertex( PVertex pv if (!helper_.try_lock_and_get_incident_slivers( pv.vertex(), sliver_criterion_, sliver_bound, slivers)) { - *p_could_lock_zone = false; + *could_lock_zone = false; #ifdef CGAL_CONCURRENT_MESH_3_PROFILING bcounter.increment_branch_1(); // THIS is a late withdrawal! #endif @@ -1286,9 +1286,9 @@ perturb_vertex( PVertex pv sliver_criterion_, sliver_bound, modified_vertices, - p_could_lock_zone); + could_lock_zone); - if (*p_could_lock_zone) + if (*could_lock_zone) { // If vertex has changed - may happen in two cases: vertex has been moved // or vertex has been reverted to the same location - diff --git a/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h b/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h index f5087ec5933..c57e2cee17e 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h +++ b/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h @@ -506,13 +506,13 @@ private: */ template bool pump_vertex(const Vertex_handle& v, - bool *p_could_lock_zone = 0); + bool *could_lock_zone = NULL); /** * Returns the best_weight of v */ double get_best_weight(const Vertex_handle& v, - bool *p_could_lock_zone = 0) const; + bool *could_lock_zone = NULL) const; /** * Initializes pre_star and criterion_values @@ -521,7 +521,7 @@ private: initialize_prestar_and_criterion_values(const Vertex_handle& v, Pre_star& pre_star, Sliver_values& criterion_values, - bool *p_could_lock_zone = 0) const; + bool *could_lock_zone = NULL) const; /** * Expand pre_star with cell_to_add @@ -549,7 +549,7 @@ private: template void update_mesh(const Weighted_point& new_point, const Vertex_handle& old_vertex, - bool *p_could_lock_zone = 0); + bool *could_lock_zone = NULL); /** * Restores cells and boundary facets of conflict zone of new_vertex in c3t3_ @@ -1012,11 +1012,11 @@ template bool Slivers_exuder:: pump_vertex(const Vertex_handle& pumped_vertex, - bool *p_could_lock_zone) + bool *could_lock_zone) { // Get best_weight - double best_weight = get_best_weight(pumped_vertex, p_could_lock_zone); - if (p_could_lock_zone && *p_could_lock_zone == false) + double best_weight = get_best_weight(pumped_vertex, could_lock_zone); + if (could_lock_zone && *could_lock_zone == false) return false; // If best_weight < pumped_vertex weight, nothing to do @@ -1025,7 +1025,7 @@ pump_vertex(const Vertex_handle& pumped_vertex, Weighted_point wp(pumped_vertex->point(), best_weight); // Insert weighted point into mesh - update_mesh(wp, pumped_vertex, p_could_lock_zone); + update_mesh(wp, pumped_vertex, could_lock_zone); return true; } @@ -1040,16 +1040,16 @@ Slivers_exuder:: initialize_prestar_and_criterion_values(const Vertex_handle& v, Pre_star& pre_star, Sliver_values& criterion_values, - bool *p_could_lock_zone) const + bool *could_lock_zone) const { std::vector incident_cells; incident_cells.reserve(64); // Parallel - if (p_could_lock_zone) + if (could_lock_zone) { if (!helper_.try_lock_and_get_incident_cells(v, incident_cells)) { - *p_could_lock_zone = false; + *could_lock_zone = false; return; } } @@ -1187,15 +1187,15 @@ expand_prestar(const Cell_handle& cell_to_add, template double Slivers_exuder:: -get_best_weight(const Vertex_handle& v, bool *p_could_lock_zone) const +get_best_weight(const Vertex_handle& v, bool *could_lock_zone) const { // Get pre_star and criterion_values Pre_star pre_star; Sliver_values criterion_values; initialize_prestar_and_criterion_values( - v, pre_star, criterion_values, p_could_lock_zone); + v, pre_star, criterion_values, could_lock_zone); - if (p_could_lock_zone && *p_could_lock_zone == false) + if (could_lock_zone && *could_lock_zone == false) return 0.; #ifdef CGAL_MESH_3_DEBUG_SLIVERS_EXUDER @@ -1225,9 +1225,9 @@ get_best_weight(const Vertex_handle& v, bool *p_could_lock_zone) const Facet link = pre_star.front()->second; const Cell_handle& opposite_cell = tr_.mirror_facet(link).first; // CJTODO: useless? - if (p_could_lock_zone && !tr_.try_lock_cell(opposite_cell)) + if (could_lock_zone && !tr_.try_lock_cell(opposite_cell)) { - *p_could_lock_zone = false; + *could_lock_zone = false; return 0.; } can_flip = expand_prestar(opposite_cell, v, pre_star, criterion_values); @@ -1410,7 +1410,7 @@ void Slivers_exuder:: update_mesh(const Weighted_point& new_point, const Vertex_handle& old_vertex, - bool *p_could_lock_zone) + bool *could_lock_zone) { CGAL_assertion_code(std::size_t nb_vert = tr_.number_of_vertices()); @@ -1427,9 +1427,9 @@ update_mesh(const Weighted_point& new_point, std::back_inserter(boundary_facets), std::back_inserter(deleted_cells), std::back_inserter(internal_facets), - p_could_lock_zone); + could_lock_zone); - if (p_could_lock_zone && *p_could_lock_zone == false) + if (could_lock_zone && *could_lock_zone == false) return; // Get some datas to restore mesh @@ -1455,7 +1455,7 @@ update_mesh(const Weighted_point& new_point, c3t3_.set_index(new_vertex,vertice_index); // Only true for sequential version - CGAL_assertion(p_could_lock_zone || nb_vert == tr_.number_of_vertices()); + CGAL_assertion(could_lock_zone || nb_vert == tr_.number_of_vertices()); // Restore mesh restore_cells_and_boundary_facets( @@ -1463,7 +1463,7 @@ update_mesh(const Weighted_point& new_point, restore_internal_facets(umbrella, new_vertex); // Only true for sequential version - CGAL_assertion(p_could_lock_zone || nb_vert == tr_.number_of_vertices()); + CGAL_assertion(could_lock_zone || nb_vert == tr_.number_of_vertices()); } diff --git a/Mesh_3/include/CGAL/Mesh_3/vertex_perturbation.h b/Mesh_3/include/CGAL/Mesh_3/vertex_perturbation.h index 885e4389d27..34ed3b78f74 100644 --- a/Mesh_3/include/CGAL/Mesh_3/vertex_perturbation.h +++ b/Mesh_3/include/CGAL/Mesh_3/vertex_perturbation.h @@ -229,18 +229,18 @@ public: const SliverCriterion& criterion, const FT& sliver_bound, std::vector& modified_vertices, - bool *p_could_lock_zone = 0) const + bool *could_lock_zone = NULL) const { #ifndef CGAL_MESH_3_PERTURBER_VERBOSE return do_perturb(v, slivers, c3t3, domain, criterion, - sliver_bound, modified_vertices, p_could_lock_zone); + sliver_bound, modified_vertices, could_lock_zone); #else timer_.start(); // Virtual call std::pair perturb = do_perturb(v, slivers, c3t3, domain, criterion, - sliver_bound, modified_vertices, p_could_lock_zone); + sliver_bound, modified_vertices, could_lock_zone); if ( perturb.first ) ++counter_; @@ -306,7 +306,7 @@ protected: const SliverCriterion& criterion, const FT& sliver_bound, std::vector& modified_vertices, - bool *p_could_lock_zone = 0) const = 0; + bool *could_lock_zone = NULL) const = 0; /** @@ -397,7 +397,7 @@ protected: const SliverCriterion& criterion, const FT& sliver_bound, std::vector& modified_vertices, - bool *p_could_lock_zone = 0) const = 0; + bool *could_lock_zone = NULL) const = 0; protected: // ----------------------------------- @@ -415,7 +415,7 @@ protected: const MeshDomain& domain, const SliverCriterion& criterion, std::vector& modified_vertices, - bool *p_could_lock_zone = 0) const + bool *could_lock_zone = NULL) const { typedef typename C3T3::Triangulation::Geom_traits Gt; typedef typename Gt::FT FT; @@ -443,7 +443,7 @@ protected: // as long as no topological change takes place unsigned int i = 0; // Concurrent-safe version - if (p_could_lock_zone) + if (could_lock_zone) { while(Th().no_topological_change__without_set_point(c3t3.triangulation(), v, final_loc) @@ -476,9 +476,9 @@ protected: return std::make_pair(false,v); // CJTODO TEST - if (p_could_lock_zone && !helper.try_lock_point(final_loc)) + if (could_lock_zone && !helper.try_lock_point(final_loc)) { - *p_could_lock_zone = false; + *could_lock_zone = false; return std::make_pair(false,v); } @@ -487,7 +487,7 @@ protected: v, criterion, std::back_inserter(modified_vertices), - p_could_lock_zone); + could_lock_zone); } @@ -549,7 +549,7 @@ protected: const SliverCriterion& criterion, const FT&, std::vector& modified_vertices, - bool *p_could_lock_zone = 0) const + bool *could_lock_zone = NULL) const { CGAL_precondition(!slivers.empty()); @@ -565,7 +565,7 @@ protected: domain, criterion, modified_vertices, - p_could_lock_zone); + could_lock_zone); } private: @@ -707,7 +707,7 @@ protected: const SliverCriterion& criterion, const FT&, std::vector& modified_vertices, - bool *p_could_lock_zone = 0) const + bool *could_lock_zone = NULL) const { CGAL_precondition(!slivers.empty()); @@ -723,7 +723,7 @@ protected: domain, criterion, modified_vertices, - p_could_lock_zone); + could_lock_zone); } private: @@ -848,7 +848,7 @@ protected: const SliverCriterion& criterion, const FT&, std::vector& modified_vertices, - bool *p_could_lock_zone = 0) const + bool *could_lock_zone = NULL) const { CGAL_precondition(!slivers.empty()); @@ -864,7 +864,7 @@ protected: domain, criterion, modified_vertices, - p_could_lock_zone); + could_lock_zone); } private: @@ -1049,7 +1049,7 @@ protected: const SliverCriterion& criterion, const FT& sliver_bound, std::vector& modified_vertices, - bool *p_could_lock_zone = 0) const = 0; + bool *could_lock_zone = NULL) const = 0; protected: // ----------------------------------- @@ -1181,13 +1181,13 @@ protected: const SliverCriterion& criterion, const FT& sliver_bound, std::vector& modified_vertices, - bool *p_could_lock_zone = 0) const + bool *could_lock_zone = NULL) const { CGAL_precondition(!slivers.empty()); return apply_perturbation(v, slivers, c3t3, domain, criterion, sliver_bound, modified_vertices, - p_could_lock_zone); + could_lock_zone); } private: @@ -1206,7 +1206,7 @@ private: const SliverCriterion& criterion, const FT& sliver_bound, std::vector& modified_vertices, - bool *p_could_lock_zone = 0) const + bool *could_lock_zone = NULL) const { modified_vertices.clear(); @@ -1237,9 +1237,9 @@ private: new_location = helper.project_on_surface(new_location, moving_vertex); // CJTODO TEST - if (p_could_lock_zone && !helper.try_lock_point(new_location)) + if (could_lock_zone && !helper.try_lock_point(new_location)) { - *p_could_lock_zone = false; + *could_lock_zone = false; return std::make_pair(false,v); } @@ -1250,9 +1250,9 @@ private: moving_vertex, criterion, std::back_inserter(tmp_mod_vertices), - p_could_lock_zone); + could_lock_zone); - if (p_could_lock_zone && *p_could_lock_zone == false) + if (could_lock_zone && *could_lock_zone == false) return std::make_pair(false, Vertex_handle()); // get new vertex diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_3.h index 39a5d5c5a31..a2606cafd68 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_3.h @@ -146,21 +146,21 @@ vertex. Similar to the insertion in a triangulation, but ensures in addition the empty sphere property of all the created faces. The optional argument `start` is used as a starting place for the search. -The optional argument `p_could_lock_zone` is used by the concurrency-safe +The optional argument `could_lock_zone` is used by the concurrency-safe version of the triangulation. When the pointer is not null, the insertion will -try to lock vertices/cells before modifying them. If it succeeds, *p_could_lock_zone +try to lock vertices/cells before modifying them. If it succeeds, *could_lock_zone is true, otherwise it is false and the return value is Vertex_handle() (the point is not inserted). In any case, the locked vertices are not unlocked by the function, leaving this choice to the user. */ Vertex_handle insert(const Point & p, -Cell_handle start = Cell_handle(), bool *p_could_lock_zone = 0); +Cell_handle start = Cell_handle(), bool *could_lock_zone = NULL); /*! Same as above but uses `hint` as a starting place for the search. */ Vertex_handle insert(const Point & p, Vertex_handle hint, - bool *p_could_lock_zone = 0); + bool *could_lock_zone = NULL); /*! Inserts point `p` in the triangulation and returns the corresponding @@ -170,7 +170,7 @@ parameter the return values of a previous location query. See description of */ Vertex_handle insert(const Point & p, Locate_type lt, Cell_handle loc, int li, int lj, -bool *p_could_lock_zone = 0); +bool *could_lock_zone = NULL); /*! Inserts the points in the iterator range `[first,last)`. Returns the number of inserted points. @@ -259,23 +259,23 @@ void remove(Vertex_handle v); Removes the vertex `v` from the triangulation. This function is concurrency-safe if the triangulation is concurrency-safe. The removal will -try to lock vertices/cells before deleting/modifying them. If it succeeds, *p_could_lock_zone +try to lock vertices/cells before deleting/modifying them. If it succeeds, *could_lock_zone is true, otherwise it is false (and the point is not removed). In any case, the locked vertices are not unlocked by the function, leaving this choice to the user. This function will try to remove `v` only if the removal does not decrease the dimension. If the removal would decrease dimension, the function returns false -(providing the zone could be locked, i.e.\ *p_could_lock_zone = true). +(providing the zone could be locked, i.e.\ *could_lock_zone = true). \pre `v` is a finite vertex of the triangulation. \pre `dt`.`dimension()` \f$ =3\f$. -The return value is only meaningful if *p_could_lock_zone is true: +The return value is only meaningful if *could_lock_zone is true: - returns true if the vertex was removed - returns false if the vertex wasn't removed since it would decrease the dimension. */ -bool remove(Vertex_handle v, bool *p_could_lock_zone); +bool remove(Vertex_handle v, bool *could_lock_zone); /*! Removes the vertices specified by the iterator range `[first, beyond)`. diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_3.h index 3442eddd789..a9ebf96af5b 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_3.h @@ -130,19 +130,19 @@ Otherwise if `p` does not appear as a vertex of the triangulation, then it is stored as a hidden point and this method returns the default constructed handle. -The optional argument `p_could_lock_zone` is used by the concurrency-safe +The optional argument `could_lock_zone` is used by the concurrency-safe version of the triangulation. When the pointer is not null, the insertion will -try to lock vertices/cells before modifying them. If it succeeds, *p_could_lock_zone +try to lock vertices/cells before modifying them. If it succeeds, *could_lock_zone is true, otherwise it is false (and the point is not inserted). In any case, the locked vertices are not unlocked by the function, leaving this choice to the user. */ Vertex_handle insert(const Weighted_point & p, -Cell_handle start = Cell_handle(), bool *p_could_lock_zone = 0); +Cell_handle start = Cell_handle(), bool *could_lock_zone = NULL); /*! Same as above but uses `hint` as a starting place for the search. */ -Vertex_handle insert(const Weighted_point & p, Vertex_handle hint, bool *p_could_lock_zone = 0); +Vertex_handle insert(const Weighted_point & p, Vertex_handle hint, bool *could_lock_zone = NULL); /*! Inserts weighted point `p` in the triangulation and returns the corresponding @@ -151,7 +151,7 @@ parameter the return values of a previous location query. See description of `Triangulation_3::locate()`. */ Vertex_handle insert(const Weighted_point & p, Locate_type lt, -Cell_handle loc, int li, int lj, bool *p_could_lock_zone = 0); +Cell_handle loc, int li, int lj, bool *could_lock_zone = NULL); /*! Inserts the weighted points in the range `[first,last)`. @@ -239,13 +239,13 @@ void remove(Vertex_handle v); Removes the vertex `v` from the triangulation. This function is concurrency-safe if the triangulation is concurrency-safe. The removal will -try to lock vertices/cells before deleting/modifying them. If it succeeds, *p_could_lock_zone +try to lock vertices/cells before deleting/modifying them. If it succeeds, *could_lock_zone is true, otherwise it is false (and the point is not removed). In any case, the locked vertices are not unlocked by the function, leaving this choice to the user. This function will try to remove `v` only if the removal does not decrease the dimension. -The return value is only meaningful if *p_could_lock_zone is true: +The return value is only meaningful if *could_lock_zone is true: - returns true if the vertex was removed - returns false if the vertex wasn't removed since it would decrease the dimension. @@ -253,7 +253,7 @@ The return value is only meaningful if *p_could_lock_zone is true: \pre `v` is a finite vertex of the triangulation. \pre `dt`.`dimension()` \f$ =3\f$. */ -bool remove(Vertex_handle v, bool *p_could_lock_zone); +bool remove(Vertex_handle v, bool *could_lock_zone); /*! Removes the vertices specified by the iterator range `[first, beyond)`. @@ -425,9 +425,9 @@ Compute the conflicts with `p`. @param cit The cells (resp. facets) in conflict with `p`. @param bfit The facets (resp. edges) on the boundary of the conflict zone, that is, the facets (resp.\ edges) `(t, i)` where the cell (resp.. facet) `t` is in conflict, but `t->neighbor(i)` is not. @param ifit The facets (resp.\ edges) inside the conflict zone, that facets incident to two cells (resp.\ facets) in conflict. -@param p_could_lock_zone The optional argument `p_could_lock_zone` is used by the concurrency-safe +@param could_lock_zone The optional argument `could_lock_zone` is used by the concurrency-safe version of the triangulation. When the pointer is not null, the algorithm will - try to lock vertices of the conflict zone. If it succeeds, *p_could_lock_zone + try to lock vertices of the conflict zone. If it succeeds, *could_lock_zone is true, otherwise it is false (and the returned conflict zone is only partial). In any case, the locked vertices are not unlocked by the function, leaving this choice to the user. @param p_this_facet_must_be_in_the_cz @@ -455,7 +455,7 @@ find_conflicts(const Weighted_point p, Cell_handle c, OutputIteratorBoundaryFacets bfit, OutputIteratorCells cit, OutputIteratorInternalFacets ifit, -bool *p_could_lock_zone = 0, +bool *could_lock_zone = NULL, const Facet *p_this_facet_must_be_in_the_cz = 0, bool *p_the_facet_is_in_its_cz = 0); diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h index 3ec4fffa97f..d37f70ea54b 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h @@ -603,22 +603,22 @@ the facet (resp. edge, vertex) containing the query point. The optional argument `start` is used as a starting place for the search. -The optional argument `p_could_lock_zone` is used by the concurrency-safe +The optional argument `could_lock_zone` is used by the concurrency-safe version of the triangulation. When the pointer is not null, the locate will -try to lock all the vertices along the walk. If it succeeds, *p_could_lock_zone +try to lock all the vertices along the walk. If it succeeds, *could_lock_zone is true, otherwise it is false. In any case, the locked vertices are not unlocked by `locate`, leaving this choice to the user. */ Cell_handle locate(const Point & query, Cell_handle start = Cell_handle(), - bool *p_could_lock_zone = 0) const; + bool *could_lock_zone = NULL) const; /*! Same as above but uses `hint` as the starting place for the search. */ Cell_handle locate(const Point & query, Vertex_handle hint, - bool *p_could_lock_zone = 0) const; + bool *could_lock_zone = NULL) const; /*! If `query` lies inside the affine hull of the points, the \f$ k\f$-face @@ -642,16 +642,16 @@ triangulation, `lt` is set to `OUTSIDE_AFFINE_HULL` and The optional argument `start` is used as a starting place for the search. -The optional argument `p_could_lock_zone` is used by the concurrency-safe +The optional argument `could_lock_zone` is used by the concurrency-safe version of the triangulation. When the pointer is not null, the locate will -try to lock all the vertices along the walk. If it succeeds, *p_could_lock_zone +try to lock all the vertices along the walk. If it succeeds, *could_lock_zone is true, otherwise it is false. In any case, the locked vertices are not unlocked by `locate`, leaving this choice to the user. */ Cell_handle locate(const Point & query, Locate_type & lt, int & li, int & lj, Cell_handle start = Cell_handle(), -bool *p_could_lock_zone = 0 ) const; +bool *could_lock_zone = NULL ) const; /*! Same as above but uses `hint` as the starting place for the search. @@ -659,7 +659,7 @@ Same as above but uses `hint` as the starting place for the search. Cell_handle locate(const Point & query, Locate_type & lt, int & li, int & lj, Vertex_handle hint, -bool *p_could_lock_zone = 0) const; +bool *could_lock_zone = NULL) const; /*! Returns a value indicating on which side of the oriented boundary diff --git a/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h b/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h index 106cb3f4d66..d19dd74da4a 100644 --- a/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h +++ b/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h @@ -360,7 +360,7 @@ public: hint = insert(*p, hint); } -#ifdef CGAL_TRIANGULATION_3_VERBOSE +#ifdef CGAL_TRIANGULATION_3_PROFILING std::cerr << "Triangulation computed in " << t.elapsed() << " seconds." << std::endl; // CJTODO TEMP #endif @@ -443,18 +443,18 @@ public: #endif //CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO Vertex_handle insert(const Point & p, Vertex_handle hint, - bool *p_could_lock_zone = 0) + bool *could_lock_zone = NULL) { return insert(p, hint == Vertex_handle() ? this->infinite_cell() : hint->cell(), - p_could_lock_zone); + could_lock_zone); } Vertex_handle insert(const Point & p, Cell_handle start = Cell_handle(), - bool *p_could_lock_zone = 0); + bool *could_lock_zone = NULL); Vertex_handle insert(const Point & p, Locate_type lt, Cell_handle c, int li, int, - bool *p_could_lock_zone = 0); + bool *could_lock_zone = NULL); public: // internal methods @@ -591,7 +591,7 @@ public: void remove(Vertex_handle v); // Concurrency-safe // See Triangulation_3::remove for more information - bool remove(Vertex_handle v, bool *p_could_lock_zone); + bool remove(Vertex_handle v, bool *could_lock_zone); // return new cells (internal) template @@ -654,8 +654,10 @@ public: ++first; } } - + +#ifdef CGAL_TRIANGULATION_3_PROFILING std::cerr << "Points removed in " << t.elapsed() << " seconds." << std::endl; +#endif return n - number_of_vertices(); } @@ -853,17 +855,17 @@ protected: template < class Gt, class Tds, class Lds > typename Delaunay_triangulation_3::Vertex_handle Delaunay_triangulation_3:: -insert(const Point & p, Cell_handle start, bool *p_could_lock_zone) +insert(const Point & p, Cell_handle start, bool *could_lock_zone) { Locate_type lt; int li, lj; // Parallel - if (p_could_lock_zone) + if (could_lock_zone) { - Cell_handle c = locate(p, lt, li, lj, start, p_could_lock_zone); - if (*p_could_lock_zone) - return insert(p, lt, c, li, lj, p_could_lock_zone); + Cell_handle c = locate(p, lt, li, lj, start, could_lock_zone); + if (*could_lock_zone) + return insert(p, lt, c, li, lj, could_lock_zone); else return Vertex_handle(); } @@ -880,21 +882,21 @@ template < class Gt, class Tds, class Lds > typename Delaunay_triangulation_3::Vertex_handle Delaunay_triangulation_3:: insert(const Point & p, Locate_type lt, Cell_handle c, int li, int lj, - bool *p_could_lock_zone) + bool *could_lock_zone) { switch (dimension()) { case 3: { Conflict_tester_3 tester(p, this); Vertex_handle v = insert_in_conflict(p, lt, c, li, lj, - tester, hidden_point_visitor, p_could_lock_zone); + tester, hidden_point_visitor, could_lock_zone); return v; }// dim 3 case 2: { Conflict_tester_2 tester(p, this); return insert_in_conflict(p, lt, c, li, lj, - tester, hidden_point_visitor, p_could_lock_zone); + tester, hidden_point_visitor, could_lock_zone); }//dim 2 default : // dimension <= 1 @@ -1084,11 +1086,11 @@ remove(Vertex_handle v) template < class Gt, class Tds, class Lds > bool Delaunay_triangulation_3:: -remove(Vertex_handle v, bool *p_could_lock_zone) +remove(Vertex_handle v, bool *could_lock_zone) { Self tmp; Vertex_remover remover (tmp); - bool ret = Tr_Base::remove(v, remover, p_could_lock_zone); + bool ret = Tr_Base::remove(v, remover, could_lock_zone); CGAL_triangulation_expensive_postcondition(is_valid()); return ret; diff --git a/Triangulation_3/include/CGAL/Regular_triangulation_3.h b/Triangulation_3/include/CGAL/Regular_triangulation_3.h index b3db48b3e41..7a5f8cfa40c 100644 --- a/Triangulation_3/include/CGAL/Regular_triangulation_3.h +++ b/Triangulation_3/include/CGAL/Regular_triangulation_3.h @@ -397,18 +397,18 @@ namespace CGAL { Vertex_handle insert(const Weighted_point & p, Vertex_handle hint, - bool *p_could_lock_zone = 0) + bool *could_lock_zone = NULL) { return insert(p, hint == Vertex_handle() ? this->infinite_cell() : hint->cell(), - p_could_lock_zone); + could_lock_zone); } Vertex_handle insert(const Weighted_point & p, - Cell_handle start = Cell_handle(), bool *p_could_lock_zone = 0); + Cell_handle start = Cell_handle(), bool *could_lock_zone = NULL); Vertex_handle insert(const Weighted_point & p, Locate_type lt, - Cell_handle c, int li, int, bool *p_could_lock_zone = 0); + Cell_handle c, int li, int, bool *could_lock_zone = NULL); template Vertex_handle @@ -430,7 +430,7 @@ namespace CGAL { OutputIteratorBoundaryFacets bfit, OutputIteratorCells cit, OutputIteratorInternalFacets ifit - , bool *p_could_lock_zone = 0 + , bool *could_lock_zone = NULL , const Facet *p_this_facet_must_be_in_the_cz = 0 , bool *p_the_facet_is_in_its_cz = 0 ) const @@ -450,7 +450,7 @@ namespace CGAL { make_triple(std::back_inserter(facets), std::back_inserter(cells), ifit) - , p_could_lock_zone + , could_lock_zone , p_this_facet_must_be_in_the_cz , p_the_facet_is_in_its_cz ).third; @@ -463,7 +463,7 @@ namespace CGAL { make_triple(std::back_inserter(facets), std::back_inserter(cells), ifit) - , p_could_lock_zone + , could_lock_zone , p_this_facet_must_be_in_the_cz , p_the_facet_is_in_its_cz ).third; @@ -490,14 +490,14 @@ namespace CGAL { find_conflicts(const Weighted_point &p, Cell_handle c, OutputIteratorBoundaryFacets bfit, OutputIteratorCells cit - , bool *p_could_lock_zone = 0 + , bool *could_lock_zone = NULL ) const { Triple t = find_conflicts(p, c, bfit, cit, Emptyset_iterator() - , p_could_lock_zone + , could_lock_zone ); return std::make_pair(t.first, t.second); } @@ -593,7 +593,7 @@ namespace CGAL { void remove (Vertex_handle v); // Concurrency-safe // See Triangulation_3::remove for more information - bool remove (Vertex_handle v, bool *p_could_lock_zone); + bool remove (Vertex_handle v, bool *could_lock_zone); template < typename InputIterator > size_type remove(InputIterator first, InputIterator beyond) @@ -1632,17 +1632,17 @@ namespace CGAL { template < class Gt, class Tds, class Lds > typename Regular_triangulation_3::Vertex_handle Regular_triangulation_3:: - insert(const Weighted_point & p, Cell_handle start, bool *p_could_lock_zone) + insert(const Weighted_point & p, Cell_handle start, bool *could_lock_zone) { Locate_type lt; int li, lj; // Parallel - if (p_could_lock_zone) + if (could_lock_zone) { - Cell_handle c = locate(p, lt, li, lj, start, p_could_lock_zone); - if (*p_could_lock_zone) - return insert(p, lt, c, li, lj, p_could_lock_zone); + Cell_handle c = locate(p, lt, li, lj, start, could_lock_zone); + if (*could_lock_zone) + return insert(p, lt, c, li, lj, could_lock_zone); else return Vertex_handle(); } @@ -1658,7 +1658,7 @@ namespace CGAL { typename Regular_triangulation_3::Vertex_handle Regular_triangulation_3:: insert(const Weighted_point & p, Locate_type lt, Cell_handle c, - int li, int lj, bool *p_could_lock_zone) + int li, int lj, bool *could_lock_zone) { switch (dimension()) { case 3: @@ -1666,28 +1666,28 @@ namespace CGAL { Conflict_tester_3 tester (p, this); return insert_in_conflict(p, lt,c,li,lj, tester, get_hidden_point_visitor(), - p_could_lock_zone); + could_lock_zone); } case 2: { Conflict_tester_2 tester (p, this); return insert_in_conflict(p, lt,c,li,lj, tester, get_hidden_point_visitor(), - p_could_lock_zone); + could_lock_zone); } case 1: { Conflict_tester_1 tester (p, this); return insert_in_conflict(p, lt,c,li,lj, tester, get_hidden_point_visitor(), - p_could_lock_zone); + could_lock_zone); } } Conflict_tester_0 tester (p, this); return insert_in_conflict(p, lt,c,li,lj, tester, get_hidden_point_visitor(), - p_could_lock_zone); + could_lock_zone); } @@ -1827,14 +1827,14 @@ namespace CGAL { template < class Gt, class Tds, class Lds > bool Regular_triangulation_3:: - remove(Vertex_handle v, bool *p_could_lock_zone) + remove(Vertex_handle v, bool *could_lock_zone) { bool removed = true; // Locking vertex v... if (!try_lock_vertex(v)) { - *p_could_lock_zone = false; + *could_lock_zone = false; } else { @@ -1843,9 +1843,9 @@ namespace CGAL { Self tmp; Vertex_remover remover(tmp); - removed = Tr_Base::remove(v, remover, p_could_lock_zone); + removed = Tr_Base::remove(v, remover, could_lock_zone); - if (*p_could_lock_zone && removed) + if (*could_lock_zone && removed) { // Re-insert the points that v was hiding. for (typename Vertex_remover::Hidden_points_iterator diff --git a/Triangulation_3/include/CGAL/Triangulation_3.h b/Triangulation_3/include/CGAL/Triangulation_3.h index c512aad74d9..de6e9c1e434 100644 --- a/Triangulation_3/include/CGAL/Triangulation_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_3.h @@ -795,7 +795,7 @@ public: locate(const Point & p, Locate_type & lt, int & li, int & lj, Cell_handle start = Cell_handle(), - bool *p_could_lock_zone = 0) const; + bool *could_lock_zone = NULL) const; #else // no CGAL_NO_STRUCTURAL_FILTERING # ifndef CGAL_T3_STRUCTURAL_FILTERING_MAX_VISITED_CELLS # define CGAL_T3_STRUCTURAL_FILTERING_MAX_VISITED_CELLS 2500 @@ -807,14 +807,14 @@ public: inexact_locate(const Point& p, Cell_handle start, int max_num_cells = CGAL_T3_STRUCTURAL_FILTERING_MAX_VISITED_CELLS, - bool *p_could_lock_zone = 0) const; + bool *could_lock_zone = NULL) const; protected: Cell_handle exact_locate(const Point& p, Locate_type& lt, int& li, int & lj, Cell_handle start, - bool *p_could_lock_zone = 0 + bool *could_lock_zone = NULL ) const; Cell_handle @@ -823,14 +823,14 @@ protected: int& li, int & lj, Cell_handle start, internal::Structural_filtering_3_tag, - bool *p_could_lock_zone = 0) const + bool *could_lock_zone = NULL) const { Cell_handle ch = inexact_locate( - p, start, CGAL_T3_STRUCTURAL_FILTERING_MAX_VISITED_CELLS, p_could_lock_zone); - if (p_could_lock_zone && *p_could_lock_zone == false) + p, start, CGAL_T3_STRUCTURAL_FILTERING_MAX_VISITED_CELLS, could_lock_zone); + if (could_lock_zone && *could_lock_zone == false) return ch; // = Cell_handle() here else - return exact_locate(p, lt, li, lj, ch, p_could_lock_zone); + return exact_locate(p, lt, li, lj, ch, could_lock_zone); } Cell_handle @@ -839,9 +839,9 @@ protected: int& li, int & lj, Cell_handle start, internal::No_structural_filtering_3_tag - , bool *p_could_lock_zone = 0) const + , bool *could_lock_zone = NULL) const { - return exact_locate(p, lt, li, lj, start, p_could_lock_zone); + return exact_locate(p, lt, li, lj, start, could_lock_zone); } public: @@ -886,42 +886,42 @@ public: locate(const Point & p, Locate_type & lt, int & li, int & lj, Cell_handle start = Cell_handle() - , bool *p_could_lock_zone = 0 + , bool *could_lock_zone = NULL ) const { typedef Triangulation_structural_filtering_traits TSFT; typedef typename internal::Structural_filtering_selector_3< TSFT::Use_structural_filtering_tag::value >::Tag Should_filter_tag; - return generic_locate(p, lt, li, lj, start, Should_filter_tag(), p_could_lock_zone); + return generic_locate(p, lt, li, lj, start, Should_filter_tag(), could_lock_zone); } #endif // no CGAL_NO_STRUCTURAL_FILTERING Cell_handle locate(const Point & p, Cell_handle start = Cell_handle(), - bool *p_could_lock_zone = 0) const + bool *could_lock_zone = NULL) const { Locate_type lt; int li, lj; - return locate( p, lt, li, lj, start, p_could_lock_zone); + return locate( p, lt, li, lj, start, could_lock_zone); } Cell_handle locate(const Point & p, Locate_type & lt, int & li, int & lj, Vertex_handle hint, - bool *p_could_lock_zone = 0) const + bool *could_lock_zone = NULL) const { return locate(p, lt, li, lj, hint == Vertex_handle() ? infinite_cell() : hint->cell(), - p_could_lock_zone); + could_lock_zone); } Cell_handle locate(const Point & p, Vertex_handle hint, - bool *p_could_lock_zone = 0) const + bool *could_lock_zone = NULL) const { return locate(p, hint == Vertex_handle() ? infinite_cell() : hint->cell(), - p_could_lock_zone); + could_lock_zone); } // PREDICATES ON POINTS ``TEMPLATED'' by the geom traits @@ -1045,7 +1045,7 @@ public: Cell_handle c, int li, int lj, const Conflict_tester &tester, Hidden_points_visitor &hider, - bool *p_could_lock_zone = 0); + bool *could_lock_zone = NULL); template < class InputIterator > std::ptrdiff_t insert(InputIterator first, InputIterator last) @@ -1159,7 +1159,7 @@ protected: Triple it - , bool *p_could_lock_zone = 0 + , bool *could_lock_zone = NULL , const Facet *p_this_facet_must_be_in_the_cz = 0 , bool *p_the_facet_is_in_its_cz = 0 ) const @@ -1169,14 +1169,14 @@ protected: if (p_the_facet_is_in_its_cz) *p_the_facet_is_in_its_cz = false; - if (p_could_lock_zone) - *p_could_lock_zone = true; + if (could_lock_zone) + *could_lock_zone = true; - if (p_could_lock_zone) + if (could_lock_zone) { if (!try_lock_cell(d)) { - *p_could_lock_zone = false; + *could_lock_zone = false; return it; } } @@ -1203,11 +1203,11 @@ protected: // IF WE WANT TO LOCK ADJACENT CELLS // CJTODO: remove this #ifdef? #ifdef CGAL_MESH_3_CONCURRENT_REFINEMENT_LOCK_ADJ_CELLS - if (p_could_lock_zone) + if (could_lock_zone) { if (!try_lock_cell(test)) { - *p_could_lock_zone = false; + *could_lock_zone = false; return it; } } @@ -1235,11 +1235,11 @@ protected: // IF WE DO NOT WANT TO LOCK ADJACENT CELLS // CJTODO: remove this #ifdef? #if !defined(CGAL_MESH_3_CONCURRENT_REFINEMENT_LOCK_ADJ_CELLS) - if (p_could_lock_zone) + if (could_lock_zone) { if (!try_lock_cell(test)) { - *p_could_lock_zone = false; + *could_lock_zone = false; // Unlock return it; } @@ -1367,7 +1367,7 @@ protected: bool test_dim_down_using_incident_cells_3( Vertex_handle v, std::vector &incident_cells, std::vector &adj_vertices, - bool *p_could_lock_zone = 0) const; + bool *could_lock_zone = NULL) const; // REMOVAL template < class VertexRemover > @@ -1375,12 +1375,12 @@ protected: template < class VertexRemover > // Concurrency-safe version // Pre-condition: dimension = 3 - // The return value is only meaningful if *p_could_lock_zone = true: + // The return value is only meaningful if *could_lock_zone = true: // * returns true if the vertex was removed // * returns false if the vertex wasn't removed since it would decrease // the dimension => needs to be done sequentially bool remove(Vertex_handle v, VertexRemover &remover, - bool *p_could_lock_zone); + bool *could_lock_zone); template < class VertexRemover, class OutputItCells > void remove_and_give_new_cells(Vertex_handle v, VertexRemover &remover, @@ -2423,10 +2423,10 @@ typename Triangulation_3::Cell_handle Triangulation_3:: #ifdef CGAL_NO_STRUCTURAL_FILTERING locate(const Point & p, Locate_type & lt, int & li, int & lj, - Cell_handle start, bool *p_could_lock_zone) const + Cell_handle start, bool *could_lock_zone) const #else exact_locate(const Point & p, Locate_type & lt, int & li, int & lj, - Cell_handle start, bool *p_could_lock_zone) const + Cell_handle start, bool *could_lock_zone) const #endif // returns the (finite or infinite) cell p lies in // starts at cell "start" @@ -2442,8 +2442,8 @@ exact_locate(const Point & p, Locate_type & lt, int & li, int & lj, { CGAL_triangulation_expensive_assertion(start == Cell_handle() || tds().is_simplex(start) ); - if (p_could_lock_zone) - *p_could_lock_zone = true; + if (could_lock_zone) + *could_lock_zone = true; if ( dimension() >= 1 ) { // Make sure we continue from here with a finite cell. @@ -2469,11 +2469,11 @@ exact_locate(const Point & p, Locate_type & lt, int & li, int & lj, Cell_handle previous = Cell_handle(); Cell_handle c = start; - if (p_could_lock_zone) + if (could_lock_zone) { if (!try_lock_cell(c)) { - *p_could_lock_zone = false; + *could_lock_zone = false; return Cell_handle(); } } @@ -2535,13 +2535,13 @@ exact_locate(const Point & p, Locate_type & lt, int & li, int & lj, } previous = c; c = next; - if (p_could_lock_zone) + if (could_lock_zone) { //previous->unlock(); // DON'T do that, "c" may be in // the same locking cell as "previous" if (!try_lock_cell(c)) { - *p_could_lock_zone = false; + *could_lock_zone = false; return Cell_handle(); } } @@ -2760,12 +2760,12 @@ inline typename Triangulation_3::Cell_handle Triangulation_3:: inexact_locate(const Point & t, Cell_handle start, int n_of_turns, - bool *p_could_lock_zone) const + bool *could_lock_zone) const { CGAL_triangulation_expensive_assertion(start == Cell_handle() || tds().is_simplex(start) ); - if (p_could_lock_zone) - *p_could_lock_zone = true; + if (could_lock_zone) + *could_lock_zone = true; if(dimension() < 3) return start; @@ -2774,11 +2774,11 @@ inexact_locate(const Point & t, Cell_handle start, int n_of_turns, start = infinite_cell(); // CTODO: useless? - if (p_could_lock_zone) + if (could_lock_zone) { if (!try_lock_cell(start)) { - *p_could_lock_zone = false; + *could_lock_zone = false; return Cell_handle(); } } @@ -2797,11 +2797,11 @@ inexact_locate(const Point & t, Cell_handle start, int n_of_turns, Cell_handle previous = Cell_handle(); Cell_handle c = start; - if (p_could_lock_zone) + if (could_lock_zone) { if (!try_lock_cell(c)) { - *p_could_lock_zone = false; + *could_lock_zone = false; return Cell_handle(); } } @@ -2838,13 +2838,13 @@ inexact_locate(const Point & t, Cell_handle start, int n_of_turns, } previous = c; c = next; - if (p_could_lock_zone) + if (could_lock_zone) { //previous->unlock(); // DON'T do that, "c" may be in // the same locking cell as "previous" if (!try_lock_cell(c)) { - *p_could_lock_zone = false; + *could_lock_zone = false; return Cell_handle(); } } @@ -3498,10 +3498,10 @@ insert_in_conflict(const Point & p, Locate_type lt, Cell_handle c, int li, int /*lj*/, const Conflict_tester &tester, Hidden_points_visitor &hider, - bool *p_could_lock_zone) + bool *could_lock_zone) { - if (p_could_lock_zone) - *p_could_lock_zone = true; + if (could_lock_zone) + *could_lock_zone = true; switch (dimension()) { case 3: @@ -3524,7 +3524,7 @@ insert_in_conflict(const Point & p, cells.reserve(32); // Parallel - if (p_could_lock_zone) + if (could_lock_zone) { std::vector facets; facets.reserve(32); @@ -3536,9 +3536,9 @@ insert_in_conflict(const Point & p, std::back_inserter(facets), std::back_inserter(cells), Emptyset_iterator()), - p_could_lock_zone); + could_lock_zone); - if (*p_could_lock_zone == false) + if (*could_lock_zone == false) { BOOST_FOREACH(Cell_handle& ch, std::make_pair(cells.begin(), cells.end())) @@ -4045,18 +4045,18 @@ Triangulation_3:: test_dim_down_using_incident_cells_3( Vertex_handle v, std::vector &incident_cells, std::vector &adj_vertices, - bool *p_could_lock_zone) const + bool *could_lock_zone) const { CGAL_triangulation_precondition(dimension() == 3); CGAL_triangulation_precondition(! is_infinite(v) ); // Collect all vertices on the boundary // and all incident cells - if (p_could_lock_zone) + if (could_lock_zone) { - *p_could_lock_zone = try_lock_and_get_adjacent_vertices_and_cells_3( + *could_lock_zone = try_lock_and_get_adjacent_vertices_and_cells_3( v, std::back_inserter(adj_vertices), incident_cells); - if (*p_could_lock_zone == false) + if (*could_lock_zone == false) return false; } else @@ -4942,7 +4942,7 @@ template template < class VertexRemover > bool Triangulation_3:: -remove(Vertex_handle v, VertexRemover &remover, bool *p_could_lock_zone) +remove(Vertex_handle v, VertexRemover &remover, bool *could_lock_zone) { // N.B.: dimension doesn't need to be atomic since the parallel removal // will never decrease the dimension (the last few removes are done @@ -4962,7 +4962,7 @@ remove(Vertex_handle v, VertexRemover &remover, bool *p_could_lock_zone) // Locking vertex v is a good start if (!try_lock_vertex(v)) { - *p_could_lock_zone = false; + *could_lock_zone = false; #ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING bcounter.increment_branch_2(); // THIS is an early withdrawal! #endif @@ -4974,9 +4974,9 @@ remove(Vertex_handle v, VertexRemover &remover, bool *p_could_lock_zone) std::vector adj_vertices; adj_vertices.reserve(64); bool dim_down = test_dim_down_using_incident_cells_3( - v, incident_cells, adj_vertices, p_could_lock_zone); + v, incident_cells, adj_vertices, could_lock_zone); - if (*p_could_lock_zone) + if (*could_lock_zone) { if (dim_down) removed = false; @@ -4986,9 +4986,9 @@ remove(Vertex_handle v, VertexRemover &remover, bool *p_could_lock_zone) } #ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING - if (p_could_lock_zone) + if (could_lock_zone) { - if (*p_could_lock_zone) + if (*could_lock_zone) ++bcounter; else bcounter.increment_branch_1(); // THIS is a late withdrawal!