mirror of https://github.com/CGAL/cgal
Introduce a new macro CGAL_SUNPRO_INITIALIZE to workaround a SunPRO warning properly.
(can't write a test program for a warning)
This commit is contained in:
parent
f3d7319465
commit
a8243a3f12
|
|
@ -136,6 +136,14 @@
|
|||
|
||||
#endif
|
||||
|
||||
#ifdef __SUNPRO_CC
|
||||
// SunPRO 5.9 emits warnings "The variable tag has not yet been assigned a value"
|
||||
// even for empty "tag" variables. No way to write a config/testfile for this.
|
||||
# define CGAL_SUNPRO_INITIALIZE(C) C
|
||||
#else
|
||||
# define CGAL_SUNPRO_INITIALIZE(C)
|
||||
#endif
|
||||
|
||||
|
||||
//-------------------------------------------------------------------//
|
||||
// When the global min and max are no longer defined (as macros)
|
||||
|
|
|
|||
|
|
@ -158,12 +158,8 @@ public:
|
|||
bool
|
||||
operator()(const Rectangle_2& p, const Rectangle_2& q) const
|
||||
{
|
||||
typename Kernel::Rep_tag tag;
|
||||
#if defined(__sun) && defined(__SUNPRO_CC)
|
||||
// to avoid a warning "tag has not yet been assigned a value"
|
||||
typedef typename Kernel::Rep_tag Rep_tag;
|
||||
tag = Rep_tag();
|
||||
#endif // SUNPRO
|
||||
typedef typename Kernel::Rep_tag Rep_tag;
|
||||
Rep_tag tag CGAL_SUNPRO_INITIALIZE(= Rep_tag());
|
||||
return area_numerator(p, tag) * area_denominator(q, tag) <
|
||||
area_denominator(p, tag) * area_numerator(q, tag);
|
||||
}
|
||||
|
|
@ -207,12 +203,8 @@ public:
|
|||
bool
|
||||
operator()(const Parallelogram_2& p, const Parallelogram_2& q) const
|
||||
{
|
||||
typename Kernel::Rep_tag tag;
|
||||
#if defined(__sun) && defined(__SUNPRO_CC)
|
||||
// to avoid a warning "tag has not yet been assigned a value"
|
||||
typedef typename Kernel::Rep_tag Rep_tag;
|
||||
tag = Rep_tag();
|
||||
#endif // SUNPRO
|
||||
typedef typename Kernel::Rep_tag Rep_tag;
|
||||
Rep_tag tag CGAL_SUNPRO_INITIALIZE(= Rep_tag());
|
||||
return area_numerator(p, tag) * area_denominator(q, tag) <
|
||||
area_denominator(p, tag) * area_numerator(q, tag);
|
||||
}
|
||||
|
|
@ -251,12 +243,8 @@ public:
|
|||
bool
|
||||
operator()(const Strip_2& p, const Strip_2& q) const
|
||||
{
|
||||
typename Kernel::Rep_tag tag;
|
||||
#if defined(__sun) && defined(__SUNPRO_CC)
|
||||
// to avoid a warning "tag has not yet been assigned a value"
|
||||
typedef typename Kernel::Rep_tag Rep_tag;
|
||||
tag = Rep_tag();
|
||||
#endif // SUNPRO
|
||||
typedef typename Kernel::Rep_tag Rep_tag;
|
||||
Rep_tag tag CGAL_SUNPRO_INITIALIZE(= Rep_tag());
|
||||
return width_numerator(p, tag) * width_denominator(q, tag) <
|
||||
width_denominator(p, tag) * width_numerator(q, tag);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue