From a57a1d9f4782ec306218e3da94c180c6bba52caa Mon Sep 17 00:00:00 2001 From: Sylvain Pion Date: Wed, 29 Nov 2000 16:07:18 +0000 Subject: [PATCH] - De-constify look_recenter() and operator<<(string). --- .../Geomview/include/CGAL/IO/Geomview_stream.h | 14 +++++++------- Packages/Geomview/src/Geomview_stream.C | 7 +++---- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Packages/Geomview/include/CGAL/IO/Geomview_stream.h b/Packages/Geomview/include/CGAL/IO/Geomview_stream.h index 1deed9f198c..72414b8b9c5 100644 --- a/Packages/Geomview/include/CGAL/IO/Geomview_stream.h +++ b/Packages/Geomview/include/CGAL/IO/Geomview_stream.h @@ -44,7 +44,7 @@ public: ~Geomview_stream(); void clear(); - void look_recenter() const; + void look_recenter(); void set_bg_color(const Color &c); @@ -91,7 +91,7 @@ public: } Geomview_stream &operator<<(const Color &c); - Geomview_stream &operator<<(const std::string s); + Geomview_stream &operator<<(std::string s); Geomview_stream &operator<<(int i); Geomview_stream &operator<<(double d); @@ -144,12 +144,12 @@ private: void pickplane(const Bbox_3 &bbox); Color vertex_color, edge_color, face_color; - int in, out; // file descriptors for input and output pipes - int pid; // the geomview process identification - bool trace_flag; // bool that makes operator<<() write a trace on stdout. + bool trace_flag; // bool that makes operator<<() write a trace on cerr. bool binary_flag; // bool that makes operator<< write binary format - double radius_; - int line_width_; + double radius_; // radius of vertices + int line_width_; // width of edges + int in, out; // file descriptors for input and output pipes + int pid; // the geomview process identification }; inline diff --git a/Packages/Geomview/src/Geomview_stream.C b/Packages/Geomview/src/Geomview_stream.C index f403158926f..8368ecda68a 100644 --- a/Packages/Geomview/src/Geomview_stream.C +++ b/Packages/Geomview/src/Geomview_stream.C @@ -163,14 +163,13 @@ Geomview_stream::clear() } void -Geomview_stream::look_recenter() const +Geomview_stream::look_recenter() { - Geomview_stream* ncthis = (Geomview_stream*)this; - (*ncthis) << "(look-recenter World)"; + (*this) << "(look-recenter World)"; } Geomview_stream& -Geomview_stream::operator<<(const std::string s) +Geomview_stream::operator<<(std::string s) { if ((int)s.length() != ::write(out, s.data(), s.length())) { std::cerr << "write problem in the pipe while sending data to geomview"