diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-11-19 16:37:36 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-11-19 16:37:36 +0000 |
| commit | a74795bbb88ffee1cc35144466c161f2bf585e1f (patch) | |
| tree | 0f0bc7d27e310d4970ba963c622c4fa91aa6eef2 /src/Fl_Pixmap.cxx | |
| parent | 2921ca57a03c93d10e8791830256d8baf73e523f (diff) | |
Get rid of some valid compiler warnings with CodeWarrior that were reported
by Paul Chambers.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2845 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Pixmap.cxx')
| -rw-r--r-- | src/Fl_Pixmap.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Fl_Pixmap.cxx b/src/Fl_Pixmap.cxx index fa61659c0..4b706579d 100644 --- a/src/Fl_Pixmap.cxx +++ b/src/Fl_Pixmap.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.22 2002/10/11 13:54:10 easysw Exp $" +// "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.23 2002/11/19 16:37:35 easysw Exp $" // // Pixmap drawing code for the Fast Light Tool Kit (FLTK). // @@ -425,7 +425,7 @@ void Fl_Pixmap::desaturate() { ncolors = -ncolors; uchar *cmap = (uchar *)(data()[1]); for (i = 0; i < ncolors; i ++, cmap += 4) { - g = (cmap[1] * 31 + cmap[2] * 61 + cmap[3] * 8) / 100; + g = (uchar)((cmap[1] * 31 + cmap[2] * 61 + cmap[3] * 8) / 100); cmap[1] = cmap[2] = cmap[3] = g; } } else { @@ -446,7 +446,7 @@ void Fl_Pixmap::desaturate() { } if (fl_parse_color(p, r, g, b)) { - g = (r * 31 + g * 61 + b * 8) / 100; + g = (uchar)((r * 31 + g * 61 + b * 8) / 100); if (chars_per_pixel > 1) sprintf(line, "%c%c c #%02X%02X%02X", data()[i + 1][0], data()[i + 1][1], g, g, g); @@ -461,5 +461,5 @@ void Fl_Pixmap::desaturate() { } // -// End of "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.22 2002/10/11 13:54:10 easysw Exp $". +// End of "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.23 2002/11/19 16:37:35 easysw Exp $". // |
