Mercurial > hg > octave-nkf
diff src/gl-render.cc @ 13219:cf5ebc0e47e4
fix warnings for unused but set variables and shadowed variables
* quadcc.cc (Fquadcc): Delete unused variable err_excess.
* find.cc (find_nonzero_elem_idx (const PermMatrix&, int,
octave_idx_type, int)): Delete unused variable end_nc.
* eigs.cc (Feigs): Delete unused variable bmat.
* conv2.cc (Fconvn): Delete unused variable separable.
* colamd.cc (Fetree, Fsymamd): Delete unused variable nnz.
* ccolamd.cc (Fcsymamd): Delete unused variable nnz.
* pt-pr-code.cc (tree_print_code::visit_index_expression):
Delete unused variable expr_has_parens.
* pt-mat.cc (tree_matrix::rvalue1): Delete unused variables
all_complex_p and all_strings_p
(tm_const::init): Eliminate shadowed variables.
* gl-render.cc (opengl_renderer::draw_image): Delete unused
variable ok.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 25 Sep 2011 16:52:23 -0400 |
parents | 434e227b100b |
children | 834f904a3dcb |
line wrap: on
line diff
--- a/src/gl-render.cc +++ b/src/gl-render.cc @@ -2449,7 +2449,6 @@ octave_value cdata = props.get_color_data (); dim_vector dv (cdata.dims ()); int h = dv(0), w = dv(1); - bool ok = true; Matrix x = props.get_xdata ().matrix_value (); Matrix y = props.get_ydata ().matrix_value (); @@ -2593,16 +2592,11 @@ draw_pixels (j1-j0, i1-i0, GL_RGB, GL_UNSIGNED_BYTE, a); } else - { - ok = false; - warning ("opengl_texture::draw: invalid image data type (expected double, uint16, or uint8)"); - } + warning ("opengl_texture::draw: invalid image data type (expected double, uint16, or uint8)"); } else - { - ok = false; - warning ("opengl_texture::draw: invalid image size (expected n*m*3 or n*m)"); - } + warning ("opengl_texture::draw: invalid image size (expected n*m*3 or n*m)"); + glPixelZoom (1, 1); }