From 06ecd18ec799fe7482f9fb89c1087c079fa48869 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 10 Sep 2010 09:47:56 +0000 Subject: [PATCH] cleanup of (std::max) workaround --- .../include/CGAL/Random_convex_set_traits_2.h | 3 +-- Generator/include/CGAL/point_generators_2.h | 22 ++++++++----------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/Generator/include/CGAL/Random_convex_set_traits_2.h b/Generator/include/CGAL/Random_convex_set_traits_2.h index 9024480ee80..8287b4a0999 100644 --- a/Generator/include/CGAL/Random_convex_set_traits_2.h +++ b/Generator/include/CGAL/Random_convex_set_traits_2.h @@ -48,8 +48,7 @@ struct Random_convex_set_traits_2 : public Kernel { FT operator()( const Point_2& p) const { - BOOST_USING_STD_MAX(); - return max BOOST_PREVENT_MACRO_SUBSTITUTION ( CGAL_NTS abs( p.x()), CGAL_NTS abs( p.y())); + return (std::max)( CGAL_NTS abs( p.x()), CGAL_NTS abs( p.y())); } }; diff --git a/Generator/include/CGAL/point_generators_2.h b/Generator/include/CGAL/point_generators_2.h index 276c51f5437..0467b946669 100644 --- a/Generator/include/CGAL/point_generators_2.h +++ b/Generator/include/CGAL/point_generators_2.h @@ -242,13 +242,11 @@ public: // distributed on the segment from p to q except q, i.e. `*g' == // \lambda p + (1-\lambda)\, q where 0 <= \lambda < 1 . A single // random number is needed from `rnd' for each point. - : Random_generator_base

( max BOOST_PREVENT_MACRO_SUBSTITUTION - ( max BOOST_PREVENT_MACRO_SUBSTITUTION - ( to_double(p.x()), to_double(q.x())), - max BOOST_PREVENT_MACRO_SUBSTITUTION - ( to_double(p.y()), - to_double(q.y()))), - rnd) , _p(p), _q(q) { + : Random_generator_base

( (std::max)( (std::max)( to_double(p.x()), to_double(q.x())), + (std::max)( to_double(p.y()), + to_double(q.y()))), + rnd) , _p(p), _q(q) + { generate_point(); } const P& source() const { return _p; } @@ -288,12 +286,10 @@ public: Points_on_segment_2() {} Points_on_segment_2( const P& p, const P& q, std::size_t mx, std::size_t i = 0) - : Generator_base

( max BOOST_PREVENT_MACRO_SUBSTITUTION - ( max BOOST_PREVENT_MACRO_SUBSTITUTION - ( to_double(p.x()), to_double(q.x())), - max BOOST_PREVENT_MACRO_SUBSTITUTION - ( to_double(p.y()), to_double(q.y())))), - _p(p), _q(q), d_i(i), d_mx(mx) { + : Generator_base

( (std::max)( (std::max)( to_double(p.x()), to_double(q.x())), + (std::max)( to_double(p.y()), to_double(q.y())))), + _p(p), _q(q), d_i(i), d_mx(mx) + { generate_point(); } const P& source() const { return _p; }