mirror of https://github.com/CGAL/cgal
Fix some stupid warnings of Sunpro.
This commit is contained in:
parent
a55955d1d6
commit
d6711c0b51
|
|
@ -32,8 +32,6 @@ CGAL_BEGIN_NAMESPACE
|
||||||
|
|
||||||
template < class A, class S >
|
template < class A, class S >
|
||||||
struct Select : public std::binary_function< A, A, A > {
|
struct Select : public std::binary_function< A, A, A > {
|
||||||
typedef Arity_tag< 2 > Arity;
|
|
||||||
|
|
||||||
Select() {}
|
Select() {}
|
||||||
Select(const S& s) : s_(s) {}
|
Select(const S& s) : s_(s) {}
|
||||||
A operator()(const A& a, const A& b) const
|
A operator()(const A& a, const A& b) const
|
||||||
|
|
@ -49,7 +47,6 @@ struct I_Signed_x_distance_2
|
||||||
: public std::binary_function<
|
: public std::binary_function<
|
||||||
Point_2< R >, Point_2< R >, typename R::FT >
|
Point_2< R >, Point_2< R >, typename R::FT >
|
||||||
{
|
{
|
||||||
typedef Arity_tag< 2 > Arity;
|
|
||||||
typename R::FT
|
typename R::FT
|
||||||
operator()(const Point_2< R >& q1, const Point_2< R >& q2) const
|
operator()(const Point_2< R >& q1, const Point_2< R >& q2) const
|
||||||
{ return q1.x() - q2.x(); }
|
{ return q1.x() - q2.x(); }
|
||||||
|
|
@ -59,7 +56,6 @@ struct I_Signed_y_distance_2
|
||||||
: public std::binary_function<
|
: public std::binary_function<
|
||||||
Point_2< R >, Point_2< R >, typename R::FT >
|
Point_2< R >, Point_2< R >, typename R::FT >
|
||||||
{
|
{
|
||||||
typedef Arity_tag< 2 > Arity;
|
|
||||||
typename R::FT
|
typename R::FT
|
||||||
operator()(const Point_2< R >& q1, const Point_2< R >& q2) const
|
operator()(const Point_2< R >& q1, const Point_2< R >& q2) const
|
||||||
{ return q1.y() - q2.y(); }
|
{ return q1.y() - q2.y(); }
|
||||||
|
|
@ -69,7 +65,6 @@ struct I_Infinity_distance_2
|
||||||
: public std::binary_function<
|
: public std::binary_function<
|
||||||
Point_2< R >, Point_2< R >, typename R::FT >
|
Point_2< R >, Point_2< R >, typename R::FT >
|
||||||
{
|
{
|
||||||
typedef Arity_tag< 2 > Arity;
|
|
||||||
typename R::FT
|
typename R::FT
|
||||||
operator()(const Point_2< R >& q1, const Point_2< R >& q2) const {
|
operator()(const Point_2< R >& q1, const Point_2< R >& q2) const {
|
||||||
BOOST_USING_STD_MAX();
|
BOOST_USING_STD_MAX();
|
||||||
|
|
@ -83,7 +78,6 @@ struct I_Signed_infinity_distance_2
|
||||||
: public std::binary_function<
|
: public std::binary_function<
|
||||||
Point_2< R >, Point_2< R >, typename R::FT >
|
Point_2< R >, Point_2< R >, typename R::FT >
|
||||||
{
|
{
|
||||||
typedef Arity_tag< 2 > Arity;
|
|
||||||
typename R::FT
|
typename R::FT
|
||||||
operator()(const Point_2< R >& q1, const Point_2< R >& q2) const
|
operator()(const Point_2< R >& q1, const Point_2< R >& q2) const
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -479,6 +479,7 @@ four_cover_points(
|
||||||
|
|
||||||
return four_cover_points(d, o, ok, t);
|
return four_cover_points(d, o, ok, t);
|
||||||
} // four_cover_points(f, l, o, ok, t)
|
} // four_cover_points(f, l, o, ok, t)
|
||||||
|
|
||||||
template < class OutputIterator, class Traits >
|
template < class OutputIterator, class Traits >
|
||||||
OutputIterator
|
OutputIterator
|
||||||
two_cover_points(
|
two_cover_points(
|
||||||
|
|
@ -497,9 +498,6 @@ two_cover_points(
|
||||||
typename Traits::Signed_infinity_distance_2 sdist =
|
typename Traits::Signed_infinity_distance_2 sdist =
|
||||||
d.traits.signed_infinity_distance_2_object();
|
d.traits.signed_infinity_distance_2_object();
|
||||||
|
|
||||||
Min< FT > minft;
|
|
||||||
less< FT > lessft;
|
|
||||||
|
|
||||||
if (sdist(d[2], d[0]) <= FT(0)) {
|
if (sdist(d[2], d[0]) <= FT(0)) {
|
||||||
// the location domain is degenerate and [f,l) is one-pierceable
|
// the location domain is degenerate and [f,l) is one-pierceable
|
||||||
*o++ = d[0];
|
*o++ = d[0];
|
||||||
|
|
@ -512,9 +510,9 @@ two_cover_points(
|
||||||
if (d.end() ==
|
if (d.end() ==
|
||||||
find_if(d.begin(),
|
find_if(d.begin(),
|
||||||
d.end(),
|
d.end(),
|
||||||
bind(lessft,
|
bind(less<FT>(),
|
||||||
d.r,
|
d.r,
|
||||||
bind(minft,
|
bind(Min<FT>(),
|
||||||
bind(dist, d[0], _1),
|
bind(dist, d[0], _1),
|
||||||
bind(dist, d[2], _1)))))
|
bind(dist, d[2], _1)))))
|
||||||
{
|
{
|
||||||
|
|
@ -528,9 +526,9 @@ two_cover_points(
|
||||||
if (d.end() ==
|
if (d.end() ==
|
||||||
find_if(d.begin(),
|
find_if(d.begin(),
|
||||||
d.end(),
|
d.end(),
|
||||||
bind(lessft,
|
bind(less<FT>(),
|
||||||
d.r,
|
d.r,
|
||||||
bind(minft,
|
bind(Min<FT>(),
|
||||||
bind(dist, d[1], _1),
|
bind(dist, d[1], _1),
|
||||||
bind(dist, d[3], _1)))))
|
bind(dist, d[3], _1)))))
|
||||||
{
|
{
|
||||||
|
|
@ -544,6 +542,7 @@ two_cover_points(
|
||||||
ok = false;
|
ok = false;
|
||||||
return o;
|
return o;
|
||||||
} // two_cover_points(d, o, ok, t)
|
} // two_cover_points(d, o, ok, t)
|
||||||
|
|
||||||
template < class OutputIterator, class Traits >
|
template < class OutputIterator, class Traits >
|
||||||
OutputIterator
|
OutputIterator
|
||||||
three_cover_points(
|
three_cover_points(
|
||||||
|
|
@ -564,7 +563,6 @@ three_cover_points(
|
||||||
typedef typename Loc_domain< Traits >::Iterator Iterator;
|
typedef typename Loc_domain< Traits >::Iterator Iterator;
|
||||||
typename Traits::Infinity_distance_2 dist =
|
typename Traits::Infinity_distance_2 dist =
|
||||||
d.traits.infinity_distance_2_object();
|
d.traits.infinity_distance_2_object();
|
||||||
less< FT > lessft;
|
|
||||||
|
|
||||||
// test the four corners:
|
// test the four corners:
|
||||||
for (int k = 0; k < 4; ++k) {
|
for (int k = 0; k < 4; ++k) {
|
||||||
|
|
@ -574,7 +572,7 @@ three_cover_points(
|
||||||
|
|
||||||
// find first point not covered by the rectangle at d[k]
|
// find first point not covered by the rectangle at d[k]
|
||||||
Iterator i = find_if(d.begin(), d.end(),
|
Iterator i = find_if(d.begin(), d.end(),
|
||||||
bind(lessft, d.r, bind(dist, corner, _1)));
|
bind(less<FT>(), d.r, bind(dist, corner, _1)));
|
||||||
|
|
||||||
// are all points already covered?
|
// are all points already covered?
|
||||||
if (i == d.end()) {
|
if (i == d.end()) {
|
||||||
|
|
@ -617,7 +615,7 @@ three_cover_points(
|
||||||
|
|
||||||
CGAL_optimisation_expensive_assertion(
|
CGAL_optimisation_expensive_assertion(
|
||||||
save_end == find_if(d.end(), save_end,
|
save_end == find_if(d.end(), save_end,
|
||||||
bind(lessft, d.r, bind(dist, corner, _1))));
|
bind(less<FT>(), d.r, bind(dist, corner, _1))));
|
||||||
CGAL_optimisation_expensive_assertion(
|
CGAL_optimisation_expensive_assertion(
|
||||||
d.end() == find_if(d.begin(), d.end(),
|
d.end() == find_if(d.begin(), d.end(),
|
||||||
bind(std::greater_equal<FT>(),
|
bind(std::greater_equal<FT>(),
|
||||||
|
|
@ -673,7 +671,6 @@ four_cover_points(Staircases< Traits >& d, OutputIterator o, bool& ok)
|
||||||
typedef typename Staircases< Traits >::Citerator Citerator;
|
typedef typename Staircases< Traits >::Citerator Citerator;
|
||||||
typedef typename Staircases< Traits >::Intervall Intervall;
|
typedef typename Staircases< Traits >::Intervall Intervall;
|
||||||
|
|
||||||
less< FT > lessft;
|
|
||||||
Infinity_distance_2 dist = d.traits.infinity_distance_2_object();
|
Infinity_distance_2 dist = d.traits.infinity_distance_2_object();
|
||||||
Less_x_2 lessx = d.traits.less_x_2_object();
|
Less_x_2 lessx = d.traits.less_x_2_object();
|
||||||
Less_y_2 lessy = d.traits.less_y_2_object();
|
Less_y_2 lessy = d.traits.less_y_2_object();
|
||||||
|
|
@ -713,7 +710,7 @@ four_cover_points(Staircases< Traits >& d, OutputIterator o, bool& ok)
|
||||||
|
|
||||||
// find first point not covered by the rectangle at d[k]
|
// find first point not covered by the rectangle at d[k]
|
||||||
Iterator i = find_if(d.begin(), d.end(),
|
Iterator i = find_if(d.begin(), d.end(),
|
||||||
bind(lessft, d.r, bind(dist, corner, _1)));
|
bind(less<FT>(), d.r, bind(dist, corner, _1)));
|
||||||
|
|
||||||
// are all points already covered?
|
// are all points already covered?
|
||||||
if (i == d.end()) {
|
if (i == d.end()) {
|
||||||
|
|
@ -756,7 +753,7 @@ four_cover_points(Staircases< Traits >& d, OutputIterator o, bool& ok)
|
||||||
|
|
||||||
CGAL_optimisation_expensive_assertion(
|
CGAL_optimisation_expensive_assertion(
|
||||||
save_end == find_if(d.end(), save_end,
|
save_end == find_if(d.end(), save_end,
|
||||||
bind(lessft, d.r, bind(dist, corner, _1))));
|
bind(less<FT>(), d.r, bind(dist, corner, _1))));
|
||||||
CGAL_optimisation_expensive_assertion(
|
CGAL_optimisation_expensive_assertion(
|
||||||
d.end() == find_if(d.begin(), d.end(),
|
d.end() == find_if(d.begin(), d.end(),
|
||||||
bind(std::greater_equal<FT>(),
|
bind(std::greater_equal<FT>(),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue