comparison libinterp/corefcn/txt-eng-ft.cc @ 20453: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 9267c95dbd71
children 25caa0deaabb
comparison
equal deleted inserted replaced
20452:92ac2e05f393 20453:1a22083b5929
558 // index out of bound, and assumes we we allocated 558 // index out of bound, and assumes we we allocated
559 // the right amount of horizontal space in the bbox. 559 // the right amount of horizontal space in the bbox.
560 if (x0 < 0) 560 if (x0 < 0)
561 x0 = 0; 561 x0 = 0;
562 562
563 for (unsigned int r = 0; r < bitmap.rows; r++) 563 for (int r = 0; static_cast<unsigned int> (r) < bitmap.rows; r++)
564 for (unsigned int c = 0; c < bitmap.width; c++) 564 for (int c = 0; static_cast<unsigned int> (c) < bitmap.width; c++)
565 { 565 {
566 unsigned char pix = bitmap.buffer[r*bitmap.width+c]; 566 unsigned char pix = bitmap.buffer[r*bitmap.width+c];
567 if (x0+c < 0 || x0+c >= pixels.dim2 () 567 if (x0+c < 0 || x0+c >= pixels.dim2 ()
568 || y0-r < 0 || y0-r >= pixels.dim3 ()) 568 || y0-r < 0 || y0-r >= pixels.dim3 ())
569 { 569 {