From: pjrm Date: Mon, 28 Jan 2008 21:23:39 +0000 (+0000) Subject: noop: Address some cast-string-to-mutable-chars warnings. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=23f621800bcb9751456da3f838dff49ddd207ae9;p=inkscape.git noop: Address some cast-string-to-mutable-chars warnings. --- diff --git a/src/axis-manip.h b/src/axis-manip.h index 56306cc05..e39a27d12 100644 --- a/src/axis-manip.h +++ b/src/axis-manip.h @@ -34,23 +34,14 @@ enum Axis { extern Axis axes[4]; -inline gchar * string_from_axis (Proj::Axis axis) { +inline gchar const * +string_from_axis(Proj::Axis axis) { switch (axis) { - case X: - return "X"; - break; - case Y: - return "Y"; - break; - case Z: - return "Z"; - break; - case W: - return "W"; - break; - case NONE: - return "NONE"; - break; + case X: return "X"; break; + case Y: return "Y"; break; + case Z: return "Z"; break; + case W: return "W"; break; + case NONE: return "NONE"; break; } return ""; } diff --git a/src/proj_pt.h b/src/proj_pt.h index 30f375aa5..f27719c83 100644 --- a/src/proj_pt.h +++ b/src/proj_pt.h @@ -83,7 +83,7 @@ public: NR::Point affine(); inline bool is_finite() { return pt[2] != 0; } // FIXME: Should we allow for some tolerance? gchar *coord_string(); - inline void print(gchar *s) const { g_print ("%s(%8.2f : %8.2f : %8.2f)\n", s, pt[0], pt[1], pt[2]); } + inline void print(gchar const *s) const { g_print ("%s(%8.2f : %8.2f : %8.2f)\n", s, pt[0], pt[1], pt[2]); } private: double pt[3]; @@ -148,7 +148,7 @@ public: void normalize(); inline bool is_finite() { return pt[3] != 0; } // FIXME: Should we allow for some tolerance? gchar *coord_string(); - inline void print(gchar *s) const { + inline void print(gchar const *s) const { g_print ("%s(%8.2f : %8.2f : %8.2f : %8.2f)\n", s, pt[0], pt[1], pt[2], pt[3]); } diff --git a/src/vanishing-point.h b/src/vanishing-point.h index 47c11be18..1708fa519 100644 --- a/src/vanishing-point.h +++ b/src/vanishing-point.h @@ -105,7 +105,7 @@ public: g_return_if_fail (_persp); persp3d_get_VP (_persp, _axis).print(""); } - inline gchar *axisString () { return Proj::string_from_axis (_axis); } + inline gchar const *axisString () { return Proj::string_from_axis(_axis); } unsigned int my_counter; static unsigned int global_counter; // FIXME: Only to implement operator< so that we can merge lists. Do this in a better way!!