From fbbb61a5f286174ff8287062998bedaf6358c2db Mon Sep 17 00:00:00 2001 From: Sylvain Pion Date: Thu, 27 Sep 2001 13:58:33 +0000 Subject: [PATCH] - SunPro fixes. --- Packages/Interval_arithmetic/changes.txt | 4 ++-- .../Interval_arithmetic/include/CGAL/Filtered_kernel.h | 6 +++++- Packages/Interval_arithmetic/include/CGAL/Lazy_exact_nt.h | 4 ++-- .../include/CGAL/Static_filters/Orientation_2.h | 5 ++--- .../test/Interval_arithmetic/Lazy_exact_nt.C | 8 +++++++- .../test/Interval_arithmetic/Static_filters.C | 2 +- 6 files changed, 19 insertions(+), 10 deletions(-) diff --git a/Packages/Interval_arithmetic/changes.txt b/Packages/Interval_arithmetic/changes.txt index cbffef82a8e..693879fd0d7 100644 --- a/Packages/Interval_arithmetic/changes.txt +++ b/Packages/Interval_arithmetic/changes.txt @@ -1,7 +1,7 @@ Changes done to the Interval Arithmetic package. -Version 4.119 on ?? September 2001 -- .. +Version 4.119 on 27 September 2001 +- SunPro fixes. Version 4.118 on 17 September 2001 - CGAL_IA_NEW_FILTERS and various cleanups. diff --git a/Packages/Interval_arithmetic/include/CGAL/Filtered_kernel.h b/Packages/Interval_arithmetic/include/CGAL/Filtered_kernel.h index 16ff47a94f2..51293e54ac9 100644 --- a/Packages/Interval_arithmetic/include/CGAL/Filtered_kernel.h +++ b/Packages/Interval_arithmetic/include/CGAL/Filtered_kernel.h @@ -48,7 +48,11 @@ template , class C2E = Cartesian_converter, class C2F = Cartesian_converter > > + Interval_converter< +#ifndef __SUNPRO_CC + CGAL_TYPENAME_MSVC_NULL +#endif + CK::RT> > > class Filtered_kernel { public: diff --git a/Packages/Interval_arithmetic/include/CGAL/Lazy_exact_nt.h b/Packages/Interval_arithmetic/include/CGAL/Lazy_exact_nt.h index dadba4d6310..69b0bd3bc78 100644 --- a/Packages/Interval_arithmetic/include/CGAL/Lazy_exact_nt.h +++ b/Packages/Interval_arithmetic/include/CGAL/Lazy_exact_nt.h @@ -87,7 +87,7 @@ struct Lazy_exact_rep : public Rep Lazy_exact_rep (const Interval_base i) : in(i), et(NULL) {} - Interval_nt<> approx() const // Better return a const ref instead ? + Interval_nt approx() const // Better return a const ref instead ? { return in; } @@ -263,7 +263,7 @@ public : Self operator/ (const Self & a) const { return new Lazy_exact_Div(*this, a); } - Interval_nt<> approx() const // throw() ? + Interval_nt approx() const // throw() ? { return ptr()->approx(); } Interval_nt_advanced approx_adv() const diff --git a/Packages/Interval_arithmetic/include/CGAL/Static_filters/Orientation_2.h b/Packages/Interval_arithmetic/include/CGAL/Static_filters/Orientation_2.h index fd3ce42d108..2256e1203f9 100644 --- a/Packages/Interval_arithmetic/include/CGAL/Static_filters/Orientation_2.h +++ b/Packages/Interval_arithmetic/include/CGAL/Static_filters/Orientation_2.h @@ -85,6 +85,8 @@ public: private: + typedef Simple_cartesian >::Point_2 P; + Orientation opti_orientationC2(double px, double py, double qx, double qy, @@ -126,9 +128,6 @@ private: static Profile_counter fail("Orientation_2 semi-static failures"); ++fail; #endif - typedef Simple_cartesian >::Point_2 K; - typedef K::Point_2 P; - Orientation oooo = orientation(P(px,py), P(qx,qy), P(rx,ry)); #ifdef CGAL_PROFILE if (oooo == ZERO) { diff --git a/Packages/Interval_arithmetic/test/Interval_arithmetic/Lazy_exact_nt.C b/Packages/Interval_arithmetic/test/Interval_arithmetic/Lazy_exact_nt.C index 988e038edf3..c11df929ee8 100644 --- a/Packages/Interval_arithmetic/test/Interval_arithmetic/Lazy_exact_nt.C +++ b/Packages/Interval_arithmetic/test/Interval_arithmetic/Lazy_exact_nt.C @@ -13,7 +13,13 @@ typedef leda_real Exact_NT; #else typedef CGAL::Quotient Exact_NT; // doesn't do exact sqrt() -namespace CGAL { Exact_NT sqrt(const Exact_NT &) { abort(); } } +namespace CGAL { +Exact_NT sqrt(const Exact_NT &) +{ + abort(); + return Exact_NT(); +} +} #endif typedef CGAL::Lazy_exact_nt NT; diff --git a/Packages/Interval_arithmetic/test/Interval_arithmetic/Static_filters.C b/Packages/Interval_arithmetic/test/Interval_arithmetic/Static_filters.C index 32ae5699cf0..edfbda5c86e 100644 --- a/Packages/Interval_arithmetic/test/Interval_arithmetic/Static_filters.C +++ b/Packages/Interval_arithmetic/test/Interval_arithmetic/Static_filters.C @@ -51,7 +51,7 @@ int main() // Kf::Point_3 pf(p.x(), p.y(), p.z()), qf(q.x(), q.y(), q.z()), // rf(r.x(), r.y(), r.z()), sf(s.x(), s.y(), s.z()); // CGAL::Protect_FPU_rounding Z; - for (int j=0; j<100000; ++j) { + for (int j=0; j<1000; ++j) { // assert( my_o(p, q, r, s) == ore(pe, qe, re, se) ); ooo = my_o(p, q, r, s); // 2.62 s -> 2.22 s ooo = my_o2(p2, q2, r2); // 2.62 s -> 2.22 s