patching for visual studio protections bug

This commit is contained in:
Daniel Russel 2006-03-24 01:57:48 +00:00
parent b901b906d1
commit a7c555fdc8
6 changed files with 28 additions and 19 deletions

View File

@ -51,18 +51,20 @@ protected:
return std::acos(ac);
}
typedef typename Qt_gui::Listener QTL;
//! This class listens for redraw requests (PICTURE_IS_VALID becoming false)
/*!
It calls the draw method when it recieves a notification.
*/
class Listener: public Qt_gui::Listener
class Listener: public QTL
{
typedef typename Qt_gui::Listener P;
typedef typename QTL P;
public:
Listener(typename Qt_gui::Handle &h, Qt_del *t): Qt_gui::Listener(h), t_(t){}
virtual void new_notification(typename Qt_gui::Listener::Notification_type nt) {
if (nt == Qt_gui::Listener::PICTURE_IS_VALID) {
t_->draw(*P::widget(), P::notifier()->current_time());
Listener(typename Qt_gui::Handle &h, Qt_del *t): P(h), t_(t){}
virtual void new_notification(typename QTL::Notification_type nt) {
if (nt == QTL::PICTURE_IS_VALID) {
t_->draw(*P::widget(), P::notifier()->current_time());
}
}
protected:

View File

@ -41,10 +41,11 @@ class Qt_triangulation_2: public Ref_counted<Qt_triangulation_2<Kinetic_Delaunay
typedef internal::Triangulation_data_structure_helper_2<typename Kinetic_Delaunay::Triangulation::Triangulation_data_structure> TDS_helper;
// maybe icl wants the class definition before the useage.
class Listener: public Qt_gui::Listener
typedef typename Qt_gui::Listener QTL;
class Listener: public QTL
{
typedef Qt_triangulation_2<Kinetic_Delaunay, Qt_gui, Qt_mpt> Container;
typedef typename Qt_gui::Listener P;
typedef typename QTL P;
public:
Listener(typename Qt_gui::Handle &h, Container *t): P(h), t_(t){}
virtual void new_notification(typename P::Notification_type nt) {

View File

@ -71,8 +71,9 @@ CGAL_POLYNOMIAL_END_INTERNAL_NAMESPACE
namespace std {
template <>
struct numeric_limits<CGAL_POLYNOMIAL_NS::internal::Double_with_infinity >: public numeric_limits<double>
class numeric_limits<CGAL_POLYNOMIAL_NS::internal::Double_with_infinity >: public numeric_limits<double>
{
public:
static const bool is_specialized = true;
static const bool has_infinity=true;
static double infinity() throw() {return std::numeric_limits<double>::max();}

View File

@ -250,8 +250,9 @@ CGAL_END_NAMESPACE
namespace std
{
template <class Tr>
struct numeric_limits<CGAL_POLYNOMIAL_NS::internal::Explicit_root<Tr> >: public numeric_limits<Tr>
class numeric_limits<CGAL_POLYNOMIAL_NS::internal::Explicit_root<Tr> >: public numeric_limits<Tr>
{
public:
typedef numeric_limits<Tr> P;
typedef CGAL_POLYNOMIAL_NS::internal::Explicit_root<Tr> T;
static const bool is_specialized = true;

View File

@ -828,8 +828,9 @@ namespace CGAL
namespace std
{
template <class Tr>
struct numeric_limits<CGAL_POLYNOMIAL_NS::internal::Simple_interval_root<Tr> >
class numeric_limits<CGAL_POLYNOMIAL_NS::internal::Simple_interval_root<Tr> >
{
public:
typedef CGAL_POLYNOMIAL_NS::internal::Simple_interval_root<Tr> T;
static const bool is_specialized = true;
static T min() throw () {return -T::infinity();}

View File

@ -889,13 +889,15 @@ public:
//======================
double compute_double(double acc = 1e-10) const
{
if ( idx == -1 ) {
return DBL_MAX * DBL_MAX;
}
if ( idx == -2 ) {
if (idx < 0) {
double inf=std::numeric_limits<double>::has_infinity? std::numeric_limits<double>::infinity() : std::numeric_limits<double>::max();
if ( idx == -1 ){
return inf;
} else return -inf;
}
/*if ( idx == -2 ) {
return -DBL_MAX * DBL_MAX;
}
}*/
if ( is_exact() ) {
return CGAL_POLYNOMIAL_TO_DOUBLE(lower_bound());
@ -1030,10 +1032,11 @@ CGAL_END_NAMESPACE
namespace std
{
template <class S, class I>
struct numeric_limits<CGAL_POLYNOMIAL_NS::internal::Sturm_root_rep<S,I> >:
class numeric_limits<CGAL_POLYNOMIAL_NS::internal::Sturm_root_rep<S,I> >:
public numeric_limits<typename CGAL_POLYNOMIAL_NS::internal::Sturm_root_rep<S,I>::NT >
{
typedef numeric_limits<CGAL_POLYNOMIAL_NS::internal::Sturm_root_rep<S,I> > P;
public:
typedef numeric_limits<typename CGAL_POLYNOMIAL_NS::internal::Sturm_root_rep<S,I>::NT > P;
typedef CGAL_POLYNOMIAL_NS::internal::Sturm_root_rep<S,I> T;
static const bool is_specialized = true;
static T min() throw() {return T(P::min());}