]> git.imager.perl.org - imager.git/commitdiff
attempt to work around a compiler bug in the gcc pre-4.0 that shipped
authorTony Cook <tony@develop=help.com>
Sun, 25 Mar 2007 11:56:52 +0000 (11:56 +0000)
committerTony Cook <tony@develop=help.com>
Sun, 25 Mar 2007 11:56:52 +0000 (11:56 +0000)
with OS X 10.4

TODO
fills.c

diff --git a/TODO b/TODO
index d8e230241686be45e41fdb195d8d4b5cf713b826..e53b9a2759bc93c7266bed5a10bf57af9be4e022 100644 (file)
--- 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 43eb20ac1194d2bd65ed87759108636d4c48657d..6e929199dac9d1247173a6c5dd6d24c13a33aa1c 100644 (file)
--- 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;