Mercurial > hg > octave-lyh
changeset 10553:f88e3d5d88e2
avoid GCC warnings
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 23 Apr 2010 15:57:32 -0400 |
parents | 394a83606f03 |
children | dfdc040a0c5e |
files | scripts/ChangeLog scripts/gethelp.cc src/ChangeLog src/DLD-FUNCTIONS/fltk_backend.cc src/graphics.cc src/graphics.h.in src/txt-eng-ft.cc |
diffstat | 7 files changed, 39 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2010-04-23 John W. Eaton <jwe@octave.org> + + * gethelp.cc (extract_help_text): Use C++ static_cast instead of + C-style cast. + 2010-04-23 Rik <octave@nomad.inbox5.com> * scripts/*.m: Untabify scripts
--- a/scripts/gethelp.cc +++ b/scripts/gethelp.cc @@ -73,7 +73,7 @@ if (! have_help_text) { first_comments_seen = true; - help_txt += (char) c; + help_txt += static_cast<char> (c); } if (c == '\n')
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,16 @@ +2010-04-23 John W. Eaton <jwe@octave.org> + + * txt-eng-ft.cc (ft_render::visit): Declare loop counter size_t, + not int. + + * graphics.h.in (graphics_xform::untransform): Likewise. + * graphics.cc (text::properties::update_text_extent): Likewise. + * DLD-FUNCTIONS/fltk_backend.cc (plot_window::set_axes_currentpoint): + Avoid GCC shadow variable warning. + + * DLD-FUNCTIONS (plot_window::plot_window): Explicitly + initialize all data members in the order they are declared.. + 2010-04-23 John W. Eaton <jwe@octave.org> * DLD-FUNCTIONS/gcd.cc (Fgcd): Use two-argument dim_vector constructor.
--- a/src/DLD-FUNCTIONS/fltk_backend.cc +++ b/src/DLD-FUNCTIONS/fltk_backend.cc @@ -218,7 +218,9 @@ { public: plot_window (int _x, int _y, int _w, int _h, figure::properties& _fp) - : Fl_Window (_x, _y, _w, _h, "octave"), fp (_fp), shift (0) + : Fl_Window (_x, _y, _w, _h, "octave"), window_label (), shift (0), + fp (_fp), canvas (0), autoscale (0), togglegrid (0), help (0), + status (0) { callback (window_close, static_cast<void*> (this)); @@ -465,14 +467,14 @@ axes::properties& ap = dynamic_cast<axes::properties&> (ax.get_properties ()); - double x, y; - pixel2pos (ax, px, py, x, y); + double xx, yy; + pixel2pos (ax, px, py, xx, yy); Matrix pos (2,3,0); - pos(0,0) = x; - pos(1,0) = y; - pos(0,1) = x; - pos(1,1) = y; + pos(0,0) = xx; + pos(1,0) = yy; + pos(0,1) = xx; + pos(1,1) = yy; ap.set_currentpoint (pos); }
--- a/src/graphics.cc +++ b/src/graphics.cc @@ -4250,15 +4250,15 @@ #endif box = text_renderer.get_extent (elt, get_rotation ()); - Matrix extent (1, 4, 0.0); + Matrix ext (1, 4, 0.0); // FIXME: also handle left and bottom components - extent(0) = extent(1) = 1; - extent(2) = box(0); - extent(3) = box(1); - - set_extent (extent); + ext(0) = ext(1) = 1; + ext(2) = box(0); + ext(3) = box(1); + + set_extent (ext); #endif }
--- a/src/graphics.h.in +++ b/src/graphics.h.in @@ -2743,13 +2743,13 @@ static Matrix xform_eye (void); ColumnVector transform (double x, double y, double z, - bool scale = true) const; + bool use_scale = true) const; ColumnVector untransform (double x, double y, double z, - bool scale = true) const; + bool use_scale = true) const; - ColumnVector untransform (double x, double y, bool scale = true) const - { return untransform (x, y, (zlim(0)+zlim(1))/2, scale); } + ColumnVector untransform (double x, double y, bool use_scale = true) const + { return untransform (x, y, (zlim(0)+zlim(1))/2, use_scale); } Matrix xscale (const Matrix& m) const { return sx.scale (m); } Matrix yscale (const Matrix& m) const { return sy.scale (m); }