From d06d92e7e64a87f43491e1eb18c22e62e960c3ef Mon Sep 17 00:00:00 2001 From: Sylvain Pion Date: Tue, 13 Feb 2001 15:38:54 +0000 Subject: [PATCH] - Remove old style casts. --- Packages/Cartesian_kernel/changes.txt | 3 ++- .../include/CGAL/Cartesian/Aff_transformation_2.h | 2 +- .../include/CGAL/Cartesian/Aff_transformation_3.h | 2 +- .../Cartesian_kernel/include/CGAL/Cartesian/Circle_2.h | 7 ++++--- .../Cartesian_kernel/include/CGAL/Cartesian/Sphere_3.h | 7 ++++--- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Packages/Cartesian_kernel/changes.txt b/Packages/Cartesian_kernel/changes.txt index edcc18aed62..59c1302f9a9 100644 --- a/Packages/Cartesian_kernel/changes.txt +++ b/Packages/Cartesian_kernel/changes.txt @@ -1,8 +1,9 @@ -Version 6.5 (?? ?????? 2001) +Version 6.5 (13 February 2001) - Kernel_traits_common.h shorted with the use of a macro - Several missing function object classes added - New class Cartesian_converter. - .area() .squared_area() and .volume(). +- Remove old style casts. Version 6.4 (25 January 2001) - Use the new file iterator_traits_pointer_specs_for_simple_cartesian_kernel.h diff --git a/Packages/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_2.h b/Packages/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_2.h index 98157a97e9c..549d9a924ef 100644 --- a/Packages/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_2.h +++ b/Packages/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_2.h @@ -182,7 +182,7 @@ public: print(std::ostream &os) const; private: - Aff_t_base* ptr() const { return (Aff_t_base*)PTR; } + Aff_t_base* ptr() const { return static_cast(PTR); } // FIXME : ptr() should be in Handle. }; diff --git a/Packages/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_3.h b/Packages/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_3.h index 2a2a668b3d1..2ac1824da84 100644 --- a/Packages/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_3.h +++ b/Packages/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_3.h @@ -179,7 +179,7 @@ protected: Self transpose() const { return ptr()->transpose(); } private: - Aff_t_base* ptr() const { return (Aff_t_base*)PTR; } + Aff_t_base* ptr() const { return static_cast(PTR); } }; diff --git a/Packages/Cartesian_kernel/include/CGAL/Cartesian/Circle_2.h b/Packages/Cartesian_kernel/include/CGAL/Cartesian/Circle_2.h index 4c7da506445..0efccc42ecc 100644 --- a/Packages/Cartesian_kernel/include/CGAL/Cartesian/Circle_2.h +++ b/Packages/Cartesian_kernel/include/CGAL/Cartesian/Circle_2.h @@ -314,12 +314,12 @@ operator<<(std::ostream &os, const CircleC2 &c) switch(os.iword(IO::mode)) { case IO::ASCII : os << c.center() << ' ' << c.squared_radius() << ' ' - << (int)c.orientation(); + << static_cast(c.orientation()); break; case IO::BINARY : os << c.center(); write(os, c.squared_radius()); - write(os, (int)c.orientation()); + write(os, static_cast(c.orientation())); break; default: os << "CircleC2(" << c.center() << ", " << c.squared_radius() ; @@ -364,7 +364,8 @@ operator>>(std::istream &is, CircleC2 &c) break; } if (is) - c = CircleC2(center, squared_radius, (Orientation)o); + c = CircleC2(center, squared_radius, + static_cast(o)); return is; } #endif // CGAL_NO_ISTREAM_EXTRACT_CIRCLEC2 diff --git a/Packages/Cartesian_kernel/include/CGAL/Cartesian/Sphere_3.h b/Packages/Cartesian_kernel/include/CGAL/Cartesian/Sphere_3.h index 803e7009ff3..275467487f3 100644 --- a/Packages/Cartesian_kernel/include/CGAL/Cartesian/Sphere_3.h +++ b/Packages/Cartesian_kernel/include/CGAL/Cartesian/Sphere_3.h @@ -321,12 +321,12 @@ operator<<(std::ostream &os, const SphereC3 &c) switch(os.iword(IO::mode)) { case IO::ASCII : os << c.center() << ' ' << c.squared_radius() << ' ' - << (int)c.orientation(); + << static_cast(c.orientation()); break; case IO::BINARY : os << c.center(); write(os, c.squared_radius()); - write(os, (int)c.orientation()); + write(os, static_cast(c.orientation())); break; default: os << "SphereC3(" << c.center() << ", " << c.squared_radius(); @@ -371,7 +371,8 @@ operator>>(std::istream &is, SphereC3 &c) break; } if (is) - c = SphereC3(center, squared_radius, (Orientation)o); + c = SphereC3(center, squared_radius, + static_cast(o)); return is; } #endif // CGAL_NO_ISTREAM_EXTRACT_SPHEREC3