changeset 20489:1a22083b5929

use different approach to avoid unsigned/signed comparison warning * txt-eng-ft.cc (ft_render::process_character): Cast value in comparison instead of changing declaration.
author John W. Eaton <jwe@octave.org>
date Wed, 19 Aug 2015 16:09:06 -0400
parents 92ac2e05f393
children 951019b7afd4
files libinterp/corefcn/txt-eng-ft.cc
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/txt-eng-ft.cc	Wed Aug 19 16:02:36 2015 -0400
+++ b/libinterp/corefcn/txt-eng-ft.cc	Wed Aug 19 16:09:06 2015 -0400
@@ -560,8 +560,8 @@
                   if (x0 < 0)
                     x0 = 0;
 
-                  for (unsigned int r = 0; r < bitmap.rows; r++)
-                    for (unsigned int c = 0; c < bitmap.width; c++)
+                  for (int r = 0; static_cast<unsigned int> (r) < bitmap.rows; r++)
+                    for (int c = 0; static_cast<unsigned int> (c) < bitmap.width; c++)
                       {
                         unsigned char pix = bitmap.buffer[r*bitmap.width+c];
                         if (x0+c < 0 || x0+c >= pixels.dim2 ()