From: Tony Cook Date: Sun, 25 Mar 2007 11:56:52 +0000 (+0000) Subject: attempt to work around a compiler bug in the gcc pre-4.0 that shipped X-Git-Tag: Imager-0.56~7 X-Git-Url: http://git.imager.perl.org/imager.git/commitdiff_plain/052acec404450770ed90f42f47f19a803c0fd693 attempt to work around a compiler bug in the gcc pre-4.0 that shipped with OS X 10.4 --- diff --git a/TODO b/TODO index d8e23024..e53b9a27 100644 --- a/TODO +++ b/TODO @@ -22,9 +22,9 @@ tests for monochrome makemap (done) correct handling of old Data::Dumper (#24391) (done) -fix unsharpmask documentation (#25531) +fix unsharpmask documentation (#25531) (done) -work around compiler bug on OS X (#25561) +work around compiler bug on OS X (#25561) (done) BEFORE 0.54 diff --git a/fills.c b/fills.c index 43eb20ac..6e929199 100644 --- a/fills.c +++ b/fills.c @@ -676,7 +676,10 @@ static void fill_hatch(i_fill_t *fill, int x, int y, int width, int channels, int mask = 128 >> xpos; while (width-- > 0) { - *data++ = (byte & mask) ? f->fg : f->bg; + if (byte & mask) + *data++ = f->fg; + else + *data++ = f->bg; if ((mask >>= 1) == 0) mask = 128; @@ -698,7 +701,10 @@ static void fill_hatchf(i_fill_t *fill, int x, int y, int width, int channels, int mask = 128 >> xpos; while (width-- > 0) { - *data++ = (byte & mask) ? f->ffg : f->fbg; + if (byte & mask) + *data++ = f->ffg; + else + *data++ = f->fbg; if ((mask >>= 1) == 0) mask = 128;