diff --git a/Arrangement_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h b/Arrangement_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h index d9314aae1ff..cfe06d541ec 100644 --- a/Arrangement_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h +++ b/Arrangement_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h @@ -3261,7 +3261,7 @@ postcondition: unsigned long sz = number_of_curves(); //to avoid signed / unsigned conversion warnings // rand() returns an int but a non negative one. - if (static_cast(rand()) > + if (static_cast(std::rand()) > RAND_MAX / (sz+1)) return false; /* INTERNAL COMPILER ERROR overide diff --git a/Box_intersection_d/test/Box_intersection_d/util.h b/Box_intersection_d/test/Box_intersection_d/util.h index 7ac1bbd9ae6..cb3922d3c06 100644 --- a/Box_intersection_d/test/Box_intersection_d/util.h +++ b/Box_intersection_d/test/Box_intersection_d/util.h @@ -24,14 +24,14 @@ struct Util { int numBoxes, numDim; int boxNum, dim; - fscanf(infile, "%d %d\n", &numBoxes, &numDim); + std::fscanf(infile, "%d %d\n", &numBoxes, &numDim); std::vector< int > min( numDim ), max( numDim ); /* Read boxes */ for(boxNum = 0; boxNum < numBoxes; boxNum++) { for(dim = 0; dim < numDim; dim++) - fscanf( infile, "[%d, %d) ", &min[dim], &max[dim] ); + std::fscanf( infile, "[%d, %d) ", &min[dim], &max[dim] ); boxes.push_back( Box( &min[0], &max[0] ) ); - fscanf(infile, "\n"); + std::fscanf(infile, "\n"); } } diff --git a/Core/include/CORE/MemoryPool.h b/Core/include/CORE/MemoryPool.h index 4e87411626e..989f1ebb794 100644 --- a/Core/include/CORE/MemoryPool.h +++ b/Core/include/CORE/MemoryPool.h @@ -44,7 +44,7 @@ class MemoryPool { public: MemoryPool() : head( 0 ) {} - void* allocate(size_t size); + void* allocate(std::size_t size); void free(void* p); // Access the corresponding static global allocator. @@ -70,7 +70,7 @@ template MemoryPool MemoryPool::memPool; template< class T, int nObjects > -void* MemoryPool< T, nObjects >::allocate(size_t) { +void* MemoryPool< T, nObjects >::allocate(std::size_t) { if ( head == 0 ) { // if no more memory in the pool const int last = nObjects - 1; diff --git a/Curved_kernel/include/CGAL/Arr_circular_line_arc_traits.h b/Curved_kernel/include/CGAL/Arr_circular_line_arc_traits.h index bb13ea7dbf3..1e89c3e5337 100644 --- a/Curved_kernel/include/CGAL/Arr_circular_line_arc_traits.h +++ b/Curved_kernel/include/CGAL/Arr_circular_line_arc_traits.h @@ -275,7 +275,7 @@ namespace CGAL { CircularKernel().intersect_2_object()(*arc1e,*arc2, std::back_inserter(container)); return object_to_object_variant(container, res); } - abort(); + std::abort(); return res;//for no warning } diff --git a/Curved_kernel/include/CGAL/IO/Dxf_reader.h b/Curved_kernel/include/CGAL/IO/Dxf_reader.h index b7e198f9567..95f9a2dde02 100644 --- a/Curved_kernel/include/CGAL/IO/Dxf_reader.h +++ b/Curved_kernel/include/CGAL/IO/Dxf_reader.h @@ -233,7 +233,7 @@ read_entities(std::istream& is, Polygons& polys, Circles& circles) } else { std::cerr << "unknown entity" << std::endl; - exit(0); + std::exit(0); } } while(str != "ENDSEC"); is >> n; @@ -272,7 +272,7 @@ read_entities(std::istream& is, Polygons& polys, Centers_and_radii& car) } else { std::cerr << "unknown entity" << std::endl; - exit(0); + std::exit(0); } } while(str != "ENDSEC"); is >> n; diff --git a/Curved_kernel/include/CGAL/Lazy_curved_kernel_constructions.h b/Curved_kernel/include/CGAL/Lazy_curved_kernel_constructions.h index 6e60b3698ba..a3b871d30fb 100644 --- a/Curved_kernel/include/CGAL/Lazy_curved_kernel_constructions.h +++ b/Curved_kernel/include/CGAL/Lazy_curved_kernel_constructions.h @@ -121,7 +121,7 @@ public: } else{ std::cout << "UNEXPECTED CONSTRUCT_INTERSECTIONS_2 PRODUCT" << std::endl; std::cout << lv.approx()[i].type().name() << std::endl; - abort(); + std::abort(); } } @@ -190,7 +190,7 @@ public: } else{ std::cout << "UNEXPECTED MAKE_X_MONOTONE PRODUCT" << std::endl; - abort(); + std::abort(); } } @@ -260,7 +260,7 @@ public: } else{ std::cout << "UNEXPECTED ADVANCED_MAKE_X_MONOTONE PRODUCT" << std::endl; - abort(); + std::abort(); } } @@ -273,7 +273,7 @@ public: for (std::vector::iterator oit = exact_objects.begin(); oit != exact_objects.end(); ++oit){ - CGAL_assertion_msg(false, "Unfinished code !!!"); abort(); + CGAL_assertion_msg(false, "Unfinished code !!!"); std::abort(); //*it = std::make_pair(make_lazy_CK((*oit).first),(*oit).second); ++it; } diff --git a/Curved_kernel/test/Curved_kernel/include/CGAL/_test_circles_constructions.h b/Curved_kernel/test/Curved_kernel/include/CGAL/_test_circles_constructions.h index 29ef57a5ec7..87c0f2a7478 100644 --- a/Curved_kernel/test/Curved_kernel/include/CGAL/_test_circles_constructions.h +++ b/Curved_kernel/test/Curved_kernel/include/CGAL/_test_circles_constructions.h @@ -44,7 +44,7 @@ void _test_circle_construct(CK ck) int random_max = 127; int random_min = -127; - FT sqrt2 = sqrt(2.0)/2; + FT sqrt2 = std::sqrt(2.0)/2; //test of get_equation_object() int x_equation = theRandom.get_int(random_min,random_max); diff --git a/Interval_arithmetic/include/CGAL/Lazy.h b/Interval_arithmetic/include/CGAL/Lazy.h index 4e1949ae8dc..9f0a746261d 100644 --- a/Interval_arithmetic/include/CGAL/Lazy.h +++ b/Interval_arithmetic/include/CGAL/Lazy.h @@ -938,7 +938,7 @@ struct Ith { return p2->first; std::cout<<" Unexpected encapsulated type "<, #endif private: - Lazy_exact_rep (const Lazy_exact_rep&) { abort(); } // cannot be copied. + Lazy_exact_rep (const Lazy_exact_rep&) { std::abort(); } // cannot be copied. }; diff --git a/Kernel_23/include/CGAL/rational_rotation.h b/Kernel_23/include/CGAL/rational_rotation.h index dd3b724f277..6a2b9b50717 100644 --- a/Kernel_23/include/CGAL/rational_rotation.h +++ b/Kernel_23/include/CGAL/rational_rotation.h @@ -166,8 +166,8 @@ rational_rotation_approximation( const double& angle, NT& isin = sin_num; NT& icos = cos_num; NT& iden = denom; - double dsin = sin(angle); - double dcos = cos(angle); + double dsin = std::sin(angle); + double dcos = std::cos(angle); double dn = CGAL::to_double(n); double dd = CGAL::to_double(d); double eps = dn / dd; @@ -253,8 +253,8 @@ rational_rotation_approximation( const double& angle, if ( swapped ) { std::swap (isin,icos); } - dsin = sin( angle); - dcos = cos( angle); + dsin = std::sin( angle); + dcos = std::cos( angle); if (dcos < 0.0) { icos = - icos; } if (dsin < 0.0) { isin = - isin; } diff --git a/Kinetic_data_structures/include/CGAL/Polynomial/internal/Rational/Root_bound_evaluator.h b/Kinetic_data_structures/include/CGAL/Polynomial/internal/Rational/Root_bound_evaluator.h index 23b42d800f4..c8f9a5b02e7 100644 --- a/Kinetic_data_structures/include/CGAL/Polynomial/internal/Rational/Root_bound_evaluator.h +++ b/Kinetic_data_structures/include/CGAL/Polynomial/internal/Rational/Root_bound_evaluator.h @@ -55,13 +55,13 @@ class Root_bound_evaluator #if 1 double d1 = to_double(max_abs); double d2 = to_double(abs_lead_cf); - double bound = ceil(d1 / d2) + 1.0; + double bound = std::ceil(d1 / d2) + 1.0; #else // MK: I MAY WANT TO CHANGE TO THE FOLLOWING CODE OR EVEN DO // COMPUTATIONS WITH INTERVALS double d1 = POLYNOMIAL_NS::to_interval(max_abs).second; double d2 = POLYNOMIAL_NS::to_interval(abs_lead_cf).first; - double bound = ceil(d1 / d2) + 1.0; + double bound = std::ceil(d1 / d2) + 1.0; #endif return NT(bound); } diff --git a/Kinetic_data_structures/test/Kinetic_data_structures/timings.C b/Kinetic_data_structures/test/Kinetic_data_structures/timings.C index ae95aebb92f..77410ab3602 100644 --- a/Kinetic_data_structures/test/Kinetic_data_structures/timings.C +++ b/Kinetic_data_structures/test/Kinetic_data_structures/timings.C @@ -122,7 +122,7 @@ template < class Traits > void test_sort(const char *nm) unsigned int beg= 4, end=5; std::cout << "Solver: " << nm << std::endl; for (unsigned int i = beg; i < end; ++i) { - printf("%6f\t", test_sort < Traits > (i, static_cast(std::ceil(500.0/i)))); + std::printf("%6f\t", test_sort < Traits > (i, static_cast(std::ceil(500.0/i)))); std::cout << std::flush; if (i > 4) ++i; diff --git a/Nef_2/demo/Nef_2/nef_2.h b/Nef_2/demo/Nef_2/nef_2.h index f7a738c85c1..8a088f1cda7 100644 --- a/Nef_2/demo/Nef_2/nef_2.h +++ b/Nef_2/demo/Nef_2/nef_2.h @@ -38,7 +38,7 @@ double_to_quotient(double x) const int maxiter = 20; // ought not be necessary, but just in case, // max 300 bits of precision int expt; - double mantissa = frexp(x, &expt); + double mantissa = std::frexp(x, &expt); long exponent = expt; double intpart; int k = 0; @@ -46,7 +46,7 @@ double_to_quotient(double x) while (mantissa != 0.0 && k++ < maxiter) { mantissa *= width; // shift double mantissa - mantissa = modf(mantissa, &intpart); + mantissa = std::modf(mantissa, &intpart); num *= shift_pow; num += (long)intpart; exponent -= shift; diff --git a/Nef_3/include/CGAL/Nef_3/K3_tree.h b/Nef_3/include/CGAL/Nef_3/K3_tree.h index bfab313ce5f..3adc782a96c 100644 --- a/Nef_3/include/CGAL/Nef_3/K3_tree.h +++ b/Nef_3/include/CGAL/Nef_3/K3_tree.h @@ -649,7 +649,7 @@ public: typename Object_list::difference_type n_vertices = std::distance(objects.begin(),v_end); CGAL_NEF_TRACEN("K3_tree(): n_vertices = " << std::distance(objects.begin(),v_end)); - frexp( (double) n_vertices, &max_depth); + std::frexp( (double) n_vertices, &max_depth); // TODO: in the presence of a infimaximal bounding box, the bounding box does not have to be computed Objects_bbox objects_bbox = traits.objects_bbox_object(); diff --git a/Nef_3/test/Nef_3/Nef_3_problematic_construction.C b/Nef_3/test/Nef_3/Nef_3_problematic_construction.C index 3e90c275787..6f5af2b8dae 100644 --- a/Nef_3/test/Nef_3/Nef_3_problematic_construction.C +++ b/Nef_3/test/Nef_3/Nef_3_problematic_construction.C @@ -88,10 +88,10 @@ private: } bool does_nef3_equals_file(Nef_polyhedron& N, const char* name, const char* suffix) { - char* fullname = new char[strlen(datadir)+strlen(name)+strlen(suffix)+1]; - strcpy(fullname, datadir); - strcat(fullname, name); - strcat(fullname, suffix); + char* fullname = new char[std::strlen(datadir)+std::strlen(name)+std::strlen(suffix)+1]; + std::strcpy(fullname, datadir); + std::strcat(fullname, name); + std::strcat(fullname, suffix); std::ofstream out("data/temp.nef3"); out << N; bool b = are_files_equal("data/temp.nef3",fullname); @@ -103,9 +103,9 @@ private: Nef_polyhedron N; - char* fullname = new char[strlen(datadir)+strlen(name)+1]; - strcpy(fullname, datadir); - strcat(fullname, name); + char* fullname = new char[std::strlen(datadir)+std::strlen(name)+1]; + std::strcpy(fullname, datadir); + std::strcat(fullname, name); std::ifstream off_file (fullname); CGAL_assertion(off_file != NULL); diff --git a/Nef_3/test/Nef_3/test_Nef_3.C b/Nef_3/test/Nef_3/test_Nef_3.C index ab114b61a42..51aac7ddc2a 100644 --- a/Nef_3/test/Nef_3/test_Nef_3.C +++ b/Nef_3/test/Nef_3/test_Nef_3.C @@ -151,9 +151,9 @@ private: } bool does_nef3_equals_file(Nef_polyhedron& N, const char* name) { - char* fullname = new char[strlen(datadir)+strlen(name)+1]; - strcpy(fullname, datadir); - strcat(fullname, name); + char* fullname = new char[std::strlen(datadir)+std::strlen(name)+1]; + std::strcpy(fullname, datadir); + std::strcat(fullname, name); std::ofstream out("data/temp.nef3"); out << N; bool b = are_files_equal("data/temp.nef3",fullname); @@ -171,9 +171,9 @@ private: } Nef_polyhedron load_nef3(const char* name) { - char* fullname = new char[strlen(datadir)+strlen(name)+1]; - strcpy(fullname, datadir); - strcat(fullname, name); + char* fullname = new char[std::strlen(datadir)+std::strlen(name)+1]; + std::strcpy(fullname, datadir); + std::strcat(fullname, name); std::ifstream input(fullname); CGAL_assertion_msg(input,"could not open file"); Nef_polyhedron tmp; diff --git a/Nef_S2/demo/Nef_S2/include/CGAL/Nef_S2/create_random_Nef_S2.h b/Nef_S2/demo/Nef_S2/include/CGAL/Nef_S2/create_random_Nef_S2.h index eece6ab3c90..35346809894 100644 --- a/Nef_S2/demo/Nef_S2/include/CGAL/Nef_S2/create_random_Nef_S2.h +++ b/Nef_S2/demo/Nef_S2/include/CGAL/Nef_S2/create_random_Nef_S2.h @@ -40,9 +40,9 @@ create_random_Nef_S2(Nef_polyhedron_S2& P, int n=5, int seed=0) { typedef CGAL::Random_points_in_cube_3 Point_source; if(seed == 0) - srand(time(0)); + std::srand(time(0)); else - srand(seed); + std::srand(seed); std::list L; Point_source S(5); diff --git a/Nef_S2/examples/Nef_S2/include/CGAL/Nef_S2/create_random_Nef_S2.h b/Nef_S2/examples/Nef_S2/include/CGAL/Nef_S2/create_random_Nef_S2.h index f9f79fc8111..bbc53397248 100644 --- a/Nef_S2/examples/Nef_S2/include/CGAL/Nef_S2/create_random_Nef_S2.h +++ b/Nef_S2/examples/Nef_S2/include/CGAL/Nef_S2/create_random_Nef_S2.h @@ -21,9 +21,9 @@ create_random_Nef_S2(Nef_polyhedron_S2& P, int n=5, int seed=0) { typedef CGAL::Random_points_in_cube_3 Point_source; if(seed == 0) - srand(time(0)); + std::srand(time(0)); else - srand(seed); + std::srand(seed); std::list L; Point_source S(5); diff --git a/Nef_S2/include/CGAL/Nef_S2/Sphere_geometry_OGL.h b/Nef_S2/include/CGAL/Nef_S2/Sphere_geometry_OGL.h index 13199507460..b39112885c9 100644 --- a/Nef_S2/include/CGAL/Nef_S2/Sphere_geometry_OGL.h +++ b/Nef_S2/include/CGAL/Nef_S2/Sphere_geometry_OGL.h @@ -92,7 +92,7 @@ class Approximator { double v2l = CGAL_NTS sqrt(v2*v2); double v3l = CGAL_NTS sqrt(v3*v3); double cosalpha = v0*v3 / v0l / v3l; - double alpha = acos(cosalpha); + double alpha = std::acos(cosalpha); const int units_per_halfcircle = 50; int units = int(units_per_halfcircle/CGAL_PI * alpha); if (units == 0) ++units; @@ -112,8 +112,8 @@ class Approximator { v0.z(),v1.z(),v2.z()); VSegment S(units+1); for (int i=0; i angle[0] ) { if ( angle[2] > angle[1] ) i=2; diff --git a/OpenNL/include/OpenNL/bicgstab.h b/OpenNL/include/OpenNL/bicgstab.h index 53370b66a72..0ff9a076706 100644 --- a/OpenNL/include/OpenNL/bicgstab.h +++ b/OpenNL/include/OpenNL/bicgstab.h @@ -185,7 +185,7 @@ private: // Test if a floating point number is (close to) 0.0 static inline bool IsZero(CoeffType a) { - return (fabs(a) < 10.0 * std::numeric_limits::min()); + return (std::fabs(a) < 10.0 * std::numeric_limits::min()); } private: diff --git a/Optimisation_basic/include/CGAL/Optimisation/Access_coordinates_begin_2.h b/Optimisation_basic/include/CGAL/Optimisation/Access_coordinates_begin_2.h index afcb535299e..ffae669afc1 100644 --- a/Optimisation_basic/include/CGAL/Optimisation/Access_coordinates_begin_2.h +++ b/Optimisation_basic/include/CGAL/Optimisation/Access_coordinates_begin_2.h @@ -51,7 +51,7 @@ class Point_2_coordinate_iterator { // iterator types typedef typename R::RT value_type; - typedef ptrdiff_t difference_type; + typedef std::ptrdiff_t difference_type; typedef value_type* pointer; typedef value_type& reference; typedef std::random_access_iterator_tag diff --git a/Optimisation_basic/include/CGAL/Optimisation/Access_coordinates_begin_3.h b/Optimisation_basic/include/CGAL/Optimisation/Access_coordinates_begin_3.h index 1bc41e4e6c9..8da0d0ec0a8 100644 --- a/Optimisation_basic/include/CGAL/Optimisation/Access_coordinates_begin_3.h +++ b/Optimisation_basic/include/CGAL/Optimisation/Access_coordinates_begin_3.h @@ -51,7 +51,7 @@ class Point_3_coordinate_iterator { // iterator types typedef typename R::RT value_type; - typedef ptrdiff_t difference_type; + typedef std::ptrdiff_t difference_type; typedef value_type* pointer; typedef value_type& reference; typedef std::random_access_iterator_tag diff --git a/Polyhedron_IO/examples/Polyhedron_IO/off2stl.C b/Polyhedron_IO/examples/Polyhedron_IO/off2stl.C index ca0a1244a70..25f502f7ca1 100644 --- a/Polyhedron_IO/examples/Polyhedron_IO/off2stl.C +++ b/Polyhedron_IO/examples/Polyhedron_IO/off2stl.C @@ -137,7 +137,7 @@ int main( int argc, char **argv) { Point r = h->next()->next()->vertex()->point(); // compute normal Vector n = CGAL::cross_product( q-p, r-p); - Vector norm = n / sqrt( n * n); + Vector norm = n / std::sqrt( n * n); *p_out << " facet normal " << norm << endl; *p_out << " outer loop " << endl; *p_out << " vertex " << p << endl; diff --git a/Polytope_distance_d/include/CGAL/Polytope_distance_d.h b/Polytope_distance_d/include/CGAL/Polytope_distance_d.h index ddbdfe8dd47..b9c4c372bf7 100644 --- a/Polytope_distance_d/include/CGAL/Polytope_distance_d.h +++ b/Polytope_distance_d/include/CGAL/Polytope_distance_d.h @@ -493,7 +493,7 @@ template < class Point, class PointIterator > struct QP_rep_signed_point_iterator { public: typedef std::pair value_type; - typedef ptrdiff_t difference_type; + typedef std::ptrdiff_t difference_type; typedef value_type* pointer; typedef value_type& reference; typedef std::random_access_iterator_tag iterator_category; diff --git a/Qt_widget/include/CGAL/IO/Qt_widget_Nef_2.h b/Qt_widget/include/CGAL/IO/Qt_widget_Nef_2.h index 3b766c16ae6..9e2329af542 100644 --- a/Qt_widget/include/CGAL/IO/Qt_widget_Nef_2.h +++ b/Qt_widget/include/CGAL/IO/Qt_widget_Nef_2.h @@ -50,7 +50,7 @@ d_to_q(double x) const int maxiter = 20; // ought not be necessary, but just in case, // max 300 bits of precision int expt; - double mantissa = frexp(x, &expt); + double mantissa = std::frexp(x, &expt); long exponent = expt; double intpart; int k = 0; @@ -58,7 +58,7 @@ d_to_q(double x) while (mantissa != 0.0 && k++ < maxiter) { mantissa *= width; // shift double mantissa - mantissa = modf(mantissa, &intpart); + mantissa = std::modf(mantissa, &intpart); num *= shift_pow; num += (long)intpart; exponent -= shift; diff --git a/STL_Extension/include/CGAL/iterator.h b/STL_Extension/include/CGAL/iterator.h index 968c9e92f13..5aca95dfb45 100644 --- a/STL_Extension/include/CGAL/iterator.h +++ b/STL_Extension/include/CGAL/iterator.h @@ -137,7 +137,7 @@ public: // types typedef std::random_access_iterator_tag iterator_category; - typedef ptrdiff_t difference_type; + typedef std::ptrdiff_t difference_type; typedef T value_type; typedef value_type* pointer; typedef value_type& reference; diff --git a/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h b/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h index cc8880c3dc2..7952e7fc7ba 100644 --- a/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h +++ b/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h @@ -132,7 +132,7 @@ private: double buffer_angle(to_dbl(angle) - half_pi / (2 * number_of_trees)); if (buffer_angle < 0) buffer_angle = 0; - Line_2 li(tan(buffer_angle), -1, 0); + Line_2 li(std::tan(buffer_angle), -1, 0); Direction_2 d(li); // rotate_by 180 degrees Transformation_2 t(ROTATION, 0, -1); @@ -330,7 +330,7 @@ public: // check that there are at least two trees if (number_of_trees < 1) { std::cerr << "There must be at least one kd-tree\n"; - exit(1); + std::exit(1); } init_angle_to_sines_table(); @@ -352,7 +352,7 @@ public: { buffer_angle = angle - half_pi / (2 * number_of_trees); if (buffer_angle < 0) buffer_angle = 0; - li = Line_2(tan(buffer_angle), -1, 0); + li = Line_2(std::tan(buffer_angle), -1, 0); d = Direction_2(li); // rotate_by 180 degrees Transformation_2 t(ROTATION, 0, -1); diff --git a/Snap_rounding_2/include/CGAL/Snap_rounding_traits_2.h b/Snap_rounding_2/include/CGAL/Snap_rounding_traits_2.h index 19e1e5ab8bb..34c2c27a26e 100644 --- a/Snap_rounding_2/include/CGAL/Snap_rounding_traits_2.h +++ b/Snap_rounding_2/include/CGAL/Snap_rounding_traits_2.h @@ -63,8 +63,8 @@ public: NT x_tmp = p.x() / pixel_size; NT y_tmp = p.y() / pixel_size; - double x_floor = floor(CGAL::to_double(x_tmp)); - double y_floor = floor(CGAL::to_double(y_tmp)); + double x_floor = std::floor(CGAL::to_double(x_tmp)); + double y_floor = std::floor(CGAL::to_double(y_tmp)); x = NT(x_floor) * pixel_size + pixel_size / NT(2.0); y = NT(y_floor) * pixel_size + pixel_size / NT(2.0); } diff --git a/Spatial_searching/demo/Spatial_searching/spatial_searching.C b/Spatial_searching/demo/Spatial_searching/spatial_searching.C index 0959b632518..6c6bd34b1da 100644 --- a/Spatial_searching/demo/Spatial_searching/spatial_searching.C +++ b/Spatial_searching/demo/Spatial_searching/spatial_searching.C @@ -200,7 +200,7 @@ private slots: } else if(CGAL::assign(c, obj)){ // exact range searching using default value 0.0 for fuzziness paramater - Fuzzy_circle exact_range(c.center(), sqrt(c.squared_radius())); + Fuzzy_circle exact_range(c.center(), std::sqrt(c.squared_radius())); typedef CGAL::Kd_tree Tree; std::list l, res; diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/test_sls_traits.C b/Straight_skeleton_2/test/Straight_skeleton_2/test_sls_traits.C index c47e150c95f..7abeae380f9 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/test_sls_traits.C +++ b/Straight_skeleton_2/test/Straight_skeleton_2/test_sls_traits.C @@ -305,6 +305,7 @@ typedef edge* edgetriple ; int main() { + using std::ldexp; std::cout << "Testing Straight_skeleton_traits_2\n"; const int oc = 4 ; diff --git a/Stream_lines_2/include/CGAL/Stream_lines_2.h b/Stream_lines_2/include/CGAL/Stream_lines_2.h index 4dfb2e868fc..2e258dc7bac 100644 --- a/Stream_lines_2/include/CGAL/Stream_lines_2.h +++ b/Stream_lines_2/include/CGAL/Stream_lines_2.h @@ -250,8 +250,8 @@ void Stream_lines_2::place_stream_lines(const Vecto while(!vector_field_2.is_in_domain(seed_point)) { std::cout << "searching valid seed point..\n"; - FT x = min_x + (FT) (((FT) rand() * xrange)/((FT) RAND_MAX)); - FT y = min_y + (FT) (((FT) rand() * yrange)/((FT) RAND_MAX)); + FT x = min_x + (FT) (((FT) std::rand() * xrange)/((FT) RAND_MAX)); + FT y = min_y + (FT) (((FT) std::rand() * yrange)/((FT) RAND_MAX)); seed_point = Point_2(x, y); } std::cout << seed_point << " first seed point\n"; diff --git a/Subdivision_method_3/include/CGAL/Subdivision_mask_3.h b/Subdivision_method_3/include/CGAL/Subdivision_mask_3.h index 34b58b9e83a..f30af76e8ba 100644 --- a/Subdivision_method_3/include/CGAL/Subdivision_mask_3.h +++ b/Subdivision_method_3/include/CGAL/Subdivision_mask_3.h @@ -361,7 +361,7 @@ public: size_t n = circulator_size(vcir); const double pi = 3.1415926; - FT a = (FT) ((4.0-2.0*cos(2.0*pi/n))/9.0); + FT a = (FT) ((4.0-2.0*std::cos(2.0*pi/n))/9.0); Vector cv = ((FT)(1.0-a)) * (vertex->point() - CGAL::ORIGIN); for (size_t i = 1; i <= n; ++i, --vcir) { diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher.h b/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher.h index 5c3f0436bf6..24052206577 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher.h @@ -596,7 +596,7 @@ namespace CGAL { << is_facet_on_surface(*fit, center) << ")" << std::endl; - exit (-1); + std::exit (-1); } } } diff --git a/Triangulation_3/test/Triangulation_3/test_regular_remove_3.C b/Triangulation_3/test/Triangulation_3/test_regular_remove_3.C index 0de4aef5e2c..4cfa6dc2be0 100644 --- a/Triangulation_3/test/Triangulation_3/test_regular_remove_3.C +++ b/Triangulation_3/test/Triangulation_3/test_regular_remove_3.C @@ -340,10 +340,10 @@ int main(int argc, char **argv) boost::int32_t seed0 = 42, seed1 = 43, seed2 = 42, seed3 = 42; // You can also pass seeds on the command line. - if (argc > 1) sscanf (argv[1], "%d", &seed0); - if (argc > 2) sscanf (argv[2], "%d", &seed1); - if (argc > 3) sscanf (argv[3], "%d", &seed2); - if (argc > 4) sscanf (argv[4], "%d", &seed3); + if (argc > 1) std::sscanf (argv[1], "%d", &seed0); + if (argc > 2) std::sscanf (argv[2], "%d", &seed1); + if (argc > 3) std::sscanf (argv[3], "%d", &seed2); + if (argc > 4) std::sscanf (argv[4], "%d", &seed3); Cls T; point_set points;