diff --git a/Mesh_2/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h b/Mesh_2/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h index a16d221a6b8..4c6dacd7802 100644 --- a/Mesh_2/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h +++ b/Mesh_2/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h @@ -108,7 +108,7 @@ public: } } - Mesh_optimization_return_code operator()(const int nb_iterations) + Mesh_optimization_return_code operator()(const std::size_t nb_iterations) { running_time_.reset(); running_time_.start(); @@ -141,7 +141,7 @@ public: bool convergence_stop = false; // Iterate - int i = -1; + std::size_t i = -1; while ( ++i < nb_iterations && ! is_time_limit_reached() ) { this->before_move(); diff --git a/Mesh_2/include/CGAL/lloyd_optimize_mesh_2.h b/Mesh_2/include/CGAL/lloyd_optimize_mesh_2.h index e145b6524e8..fe7a7c321ac 100644 --- a/Mesh_2/include/CGAL/lloyd_optimize_mesh_2.h +++ b/Mesh_2/include/CGAL/lloyd_optimize_mesh_2.h @@ -190,7 +190,7 @@ lloyd_optimize_mesh_2(CDT& cdt, const CGAL_NP_CLASS& np = parameters::default_va template Mesh_optimization_return_code lloyd_optimize_mesh_2_impl(CDT& cdt, - const int max_iterations, + const std::size_t max_iterations, const double convergence_ratio, const double freeze_bound, const double time_limit, @@ -206,7 +206,7 @@ lloyd_optimize_mesh_2(CDT& cdt, const CGAL_NP_CLASS& np = parameters::default_va template Mesh_optimization_return_code lloyd_optimize_mesh_2_impl(CDT& cdt, - const int max_iterations, + const std::size_t max_iterations, const double convergence_ratio, const double freeze_bound, const double time_limit, @@ -231,7 +231,7 @@ lloyd_optimize_mesh_2(CDT& cdt, const CGAL_NP_CLASS& np = parameters::default_va #endif // 1000 iteration max to avoid infinite loop - int nb_iterations = (0 == max_iterations) + std::size_t nb_iterations = (0 == max_iterations) ? 1000 : max_iterations; diff --git a/Mesh_2/test/Mesh_2/test_double_map.cpp b/Mesh_2/test/Mesh_2/test_double_map.cpp index 7ef6a121834..f7f82d21647 100644 --- a/Mesh_2/test/Mesh_2/test_double_map.cpp +++ b/Mesh_2/test/Mesh_2/test_double_map.cpp @@ -12,7 +12,7 @@ typedef CGAL::Double_map Map; int main(int argc, char** argv) { - unsigned int number_of_elements = 500; + int number_of_elements = 500; #ifdef CGAL_USE_BOOST_BIMAP std::cerr << "(Using the \"Boost.Bimap implementation\" of ...)\n\n"; @@ -58,14 +58,14 @@ int main(int argc, char** argv) assert(f.empty() && f2.empty()); /* AUTOMATIC CHECKS */ std::cerr << "Filling f with " << number_of_elements << " random integers...\n"; - for(unsigned int n=0; nsecond; @@ -152,7 +152,7 @@ int main(int argc, char** argv) assert(counter==number_of_elements); std::cerr << "Filling f with f(i)=i*i, i=0.." << number_of_elements -1 << "...\n"; - for(unsigned int n=0; n