cleanup of (std::max) workaround

This commit is contained in:
Andreas Fabri 2010-09-10 09:47:56 +00:00
parent 67ad0c654a
commit 06ecd18ec7
2 changed files with 10 additions and 15 deletions

View File

@ -48,8 +48,7 @@ struct Random_convex_set_traits_2 : public Kernel {
FT FT
operator()( const Point_2& p) const operator()( const Point_2& p) const
{ {
BOOST_USING_STD_MAX(); return (std::max)( CGAL_NTS abs( p.x()), CGAL_NTS abs( p.y()));
return max BOOST_PREVENT_MACRO_SUBSTITUTION ( CGAL_NTS abs( p.x()), CGAL_NTS abs( p.y()));
} }
}; };

View File

@ -242,13 +242,11 @@ public:
// distributed on the segment from p to q except q, i.e. `*g' == // distributed on the segment from p to q except q, i.e. `*g' ==
// \lambda p + (1-\lambda)\, q where 0 <= \lambda < 1 . A single // \lambda p + (1-\lambda)\, q where 0 <= \lambda < 1 . A single
// random number is needed from `rnd' for each point. // random number is needed from `rnd' for each point.
: Random_generator_base<P>( max BOOST_PREVENT_MACRO_SUBSTITUTION : Random_generator_base<P>( (std::max)( (std::max)( to_double(p.x()), to_double(q.x())),
( max BOOST_PREVENT_MACRO_SUBSTITUTION (std::max)( to_double(p.y()),
( to_double(p.x()), to_double(q.x())),
max BOOST_PREVENT_MACRO_SUBSTITUTION
( to_double(p.y()),
to_double(q.y()))), to_double(q.y()))),
rnd) , _p(p), _q(q) { rnd) , _p(p), _q(q)
{
generate_point(); generate_point();
} }
const P& source() const { return _p; } const P& source() const { return _p; }
@ -288,12 +286,10 @@ public:
Points_on_segment_2() {} Points_on_segment_2() {}
Points_on_segment_2( const P& p, const P& q, Points_on_segment_2( const P& p, const P& q,
std::size_t mx, std::size_t i = 0) std::size_t mx, std::size_t i = 0)
: Generator_base<P>( max BOOST_PREVENT_MACRO_SUBSTITUTION : Generator_base<P>( (std::max)( (std::max)( to_double(p.x()), to_double(q.x())),
( max BOOST_PREVENT_MACRO_SUBSTITUTION (std::max)( to_double(p.y()), to_double(q.y())))),
( to_double(p.x()), to_double(q.x())), _p(p), _q(q), d_i(i), d_mx(mx)
max BOOST_PREVENT_MACRO_SUBSTITUTION {
( to_double(p.y()), to_double(q.y())))),
_p(p), _q(q), d_i(i), d_mx(mx) {
generate_point(); generate_point();
} }
const P& source() const { return _p; } const P& source() const { return _p; }