From 2f78d27bd3b1376992e893de1f05b8440fb83845 Mon Sep 17 00:00:00 2001 From: Clement Jamin Date: Tue, 27 May 2014 13:21:16 +0200 Subject: [PATCH] Code clean-up --- Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h | 4 ++-- Mesh_3/include/CGAL/Meshes/Filtered_deque_container.h | 4 ++-- .../include/CGAL/Meshes/Filtered_multimap_container.h | 4 ++-- .../Triangulation_3/Triangulation_benchmark_3.cpp | 2 +- .../include/CGAL/Delaunay_triangulation_3.h | 11 +---------- .../include/CGAL/Regular_triangulation_3.h | 2 +- 6 files changed, 9 insertions(+), 18 deletions(-) diff --git a/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h b/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h index e38857cb5fa..948ee57ee5f 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h +++ b/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h @@ -1200,7 +1200,7 @@ get_best_weight(const Vertex_handle& v, bool *could_lock_zone) const double worst_criterion_value = get_min_value(criterion_values); double best_weight = 0; - // CJTODO: this computes the incident cells again! + // TODO: it seems that this computes the incident cells again double sq_d_v = get_closest_vertice_squared_distance(v); // If that boolean is set to false, it means that a facet in the complex @@ -1219,7 +1219,7 @@ get_best_weight(const Vertex_handle& v, bool *could_lock_zone) const // expand prestar (insert opposite_cell facets in pre_star) Facet link = pre_star.front()->second; const Cell_handle& opposite_cell = tr_.mirror_facet(link).first; - // CJTODO: useless? + if (could_lock_zone && !tr_.try_lock_cell(opposite_cell)) { *could_lock_zone = false; diff --git a/Mesh_3/include/CGAL/Meshes/Filtered_deque_container.h b/Mesh_3/include/CGAL/Meshes/Filtered_deque_container.h index d5224f58814..e8314bdd4c8 100644 --- a/Mesh_3/include/CGAL/Meshes/Filtered_deque_container.h +++ b/Mesh_3/include/CGAL/Meshes/Filtered_deque_container.h @@ -96,7 +96,7 @@ namespace Meshes { Element get_next_local_element_impl() { CGAL_assertion(!m_local_lists.local().empty()); - // CJTODO BUG: add this? It shouldn't be necessary as user + // Add this? It shouldn't be necessary as user // is supposed to call "no_longer_element_to_refine_impl" first /*while( !test(container.front()) ) { @@ -252,7 +252,7 @@ namespace Meshes { Element get_next_element_impl() const { CGAL_assertion(!container.empty()); - // CJTODO BUG: add this? It shouldn't be necessary as user + // Add this? It shouldn't be necessary as user // is supposed to call "no_longer_element_to_refine_impl" first /*while( !test(container.front()) ) { diff --git a/Mesh_3/include/CGAL/Meshes/Filtered_multimap_container.h b/Mesh_3/include/CGAL/Meshes/Filtered_multimap_container.h index fd33369b5f0..00d1f584ab1 100644 --- a/Mesh_3/include/CGAL/Meshes/Filtered_multimap_container.h +++ b/Mesh_3/include/CGAL/Meshes/Filtered_multimap_container.h @@ -95,7 +95,7 @@ namespace CGAL { Element get_next_local_element_impl() { CGAL_assertion(!m_local_lists.local().empty()); - // CJTODO BUG: add this? It shouldn't be necessary as user + // Add this? It shouldn't be necessary as user // is supposed to call "no_longer_element_to_refine_impl" first /*while( !test(container.front()) ) { @@ -246,7 +246,7 @@ namespace CGAL { Element get_next_element_impl() const { CGAL_assertion(!container.empty()); - // CJTODO BUG: add this? It shouldn't be necessary as user + // Add this? It shouldn't be necessary as user // is supposed to call "no_longer_element_to_refine_impl" first /*while( !test(container.front()) ) { diff --git a/Triangulation_3/benchmark/Triangulation_3/Triangulation_benchmark_3.cpp b/Triangulation_3/benchmark/Triangulation_3/Triangulation_benchmark_3.cpp index 179cee41a7f..ca8a1da7b70 100644 --- a/Triangulation_3/benchmark/Triangulation_3/Triangulation_benchmark_3.cpp +++ b/Triangulation_3/benchmark/Triangulation_3/Triangulation_benchmark_3.cpp @@ -305,7 +305,7 @@ template < typename Tr > void do_benchmarks(string name) { cout << "\n\nBenchmarking configuration : " << name << endl; - tbb::task_scheduler_init tbb_init(10); // CJTODO TEMP + // tbb::task_scheduler_init tbb_init(10); // Set number of threads benchmark_construction(); if (input_file_selected) return; diff --git a/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h b/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h index 5ab031cdc13..fd2fb6bfee4 100644 --- a/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h +++ b/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h @@ -37,7 +37,6 @@ #include #include #include -#include // CJTODO TEMP #ifndef CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO #include @@ -284,10 +283,6 @@ public: static Profile_branch_counter_3 bcounter( "early withdrawals / late withdrawals / successes [Delaunay_tri_3::insert]"); #endif - -#ifdef CGAL_TRIANGULATION_3_PROFILING - WallClockTimer t; // CJTODO TEMP -#endif size_type n = number_of_vertices(); std::vector points (first, last); @@ -298,16 +293,12 @@ public: if (this->is_parallel()) { size_t num_points = points.size(); - -#ifdef CGAL_TRIANGULATION_3_PROFILING - WallClockTimer t1; // CJTODO TEMP -#endif Vertex_handle hint; std::vector far_sphere_vertices; #ifdef CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE - const size_t MIN_NUM_POINTS_FOR_FAR_SPHERE_POINTS = 1000000; // CJTODO: ADJUST THIS + const size_t MIN_NUM_POINTS_FOR_FAR_SPHERE_POINTS = 1000000; if (num_points >= MIN_NUM_POINTS_FOR_FAR_SPHERE_POINTS) { // Add temporary vertices on a "far sphere" to reduce contention on diff --git a/Triangulation_3/include/CGAL/Regular_triangulation_3.h b/Triangulation_3/include/CGAL/Regular_triangulation_3.h index f37665e982b..e279bc33ee8 100644 --- a/Triangulation_3/include/CGAL/Regular_triangulation_3.h +++ b/Triangulation_3/include/CGAL/Regular_triangulation_3.h @@ -229,7 +229,7 @@ namespace CGAL { std::vector far_sphere_vertices; #ifdef CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE - const size_t MIN_NUM_POINTS_FOR_FAR_SPHERE_POINTS = 1000000; // CJTODO: ADJUST THIS + const size_t MIN_NUM_POINTS_FOR_FAR_SPHERE_POINTS = 1000000; if (num_points >= MIN_NUM_POINTS_FOR_FAR_SPHERE_POINTS) { // Add temporary vertices on a "far sphere" to reduce contention on