go to www.geomview.org home page
 
Home

Overview
FAQ
Documentation

Download

Mailing List

Geomview For Windows?

Support
Users
Development

Bug Reporting
Contributing
Contact Us

Sponsors

 

Site Search

 

Advanced
Search

 
About the software@geom archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ REQ 6217]: Portability patch for sphere eversion software



SGI's latest C++ compiler thinks that some operations in the
sphere eversion package are ambigious.  This patch keeps it
happy.

-tor

diff -u --recursive --new-file evert.orig/threejet.h evert/threejet.h
--- evert.orig/threejet.h	Fri Jul 14 10:58:26 1995
+++ evert/threejet.h	Thu Jun 12 02:04:16 1997
@@ -20,15 +20,20 @@
   operator TwoJet() { return TwoJet(f, fu, fv, fuv); }
   operator double() { return f; }
   operator<(double d) { return f < d; }
+  operator<(int d) { return f < d; }
   operator>(double d) { return f > d; }
+  operator>(int d) { return f > d; }
   operator<=(double d) { return f <= d; }
+  operator<=(int d) { return f <= d; }
   operator>=(double d) { return f >= d; }
   void operator %=(double d)
    { f = fmod(f, d); if (f < 0) f += d; }
   friend ThreeJet operator+(const ThreeJet x, const ThreeJet y);
   friend ThreeJet operator*(const ThreeJet x, const ThreeJet y);
   friend ThreeJet operator+(const ThreeJet x, double d);
+  friend ThreeJet operator+(const ThreeJet x, int d) {return x+double(d);}
   friend ThreeJet operator*(const ThreeJet x, double d);
+  friend ThreeJet operator*(const ThreeJet x, int d) {return x*double(d);}
   friend ThreeJet Sin(const ThreeJet x);
   friend ThreeJet Cos(const ThreeJet x);
   friend ThreeJet operator^(const ThreeJet x, double n);
diff -u --recursive --new-file evert.orig/twojet.h evert/twojet.h
--- evert.orig/twojet.h	Fri Jul 14 10:58:26 1995
+++ evert/twojet.h	Thu Jun 12 02:04:18 1997
@@ -21,6 +21,7 @@
   operator double() { return f; }
   operator<(double d) { return f < d; }
   operator>(double d) { return f > d; }
+  operator>(int d) { return f > d; }
   operator<=(double d) { return f <= d; }
   operator>=(double d) { return f >= d; }
   double df_du() { return fu; }
@@ -72,7 +73,9 @@
   friend TwoJet operator+(const TwoJet x, const TwoJet y);
   friend TwoJet operator*(const TwoJet x, const TwoJet y);
   friend TwoJet operator+(const TwoJet x, double d);
+  friend TwoJet operator+(const TwoJet x, int d) {return x+double(d);}
   friend TwoJet operator*(const TwoJet x, double d);
+  friend TwoJet operator*(const TwoJet x, int d) {return x*double(d);}
   friend TwoJet Sin(const TwoJet x);
   friend TwoJet Cos(const TwoJet x);
   friend TwoJet operator^(const TwoJet x, double n);


 
Home | Overview | FAQ | Documentation | Support | Download | Mailing List
Windows? | Development | Bug Reporting | Contributing | Contact Us | Sponsors
 
site hosted by
SourceForge Logo