diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2010-10-28 18:02:20 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2010-10-28 18:02:20 +0000 |
| commit | 291faee430b13248a1b97e1ef254b9a468a67ad1 (patch) | |
| tree | ff6f7a61ff69000fe2b0c25b71d16bbc1ee2bb3a /src/fl_plastic.cxx | |
| parent | 58bdfbdedd56582d4ed835018494dc21dc605f40 (diff) | |
Fixed a bunch of warnings from gcc 4.4.5 . Most of these are parenthesis missing to make the precedence of && over || obvious. Ah well, why not...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7765 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_plastic.cxx')
| -rw-r--r-- | src/fl_plastic.cxx | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/src/fl_plastic.cxx b/src/fl_plastic.cxx index 1cc4edae5..837f5fd76 100644 --- a/src/fl_plastic.cxx +++ b/src/fl_plastic.cxx @@ -87,13 +87,13 @@ static void frame_rect(int x, int y, int w, int h, const char *c, Fl_Color bc) { { // Draw lines around the perimeter of the button, 4 colors per // circuit. - fl_color(shade_color(g[*c++], bc)); + fl_color(shade_color(g[(int)*c++], bc)); fl_line(x, y + h + b, x + w - 1, y + h + b, x + w + b - 1, y + h); - fl_color(shade_color(g[*c++], bc)); + fl_color(shade_color(g[(int)*c++], bc)); fl_line(x + w + b - 1, y + h, x + w + b - 1, y, x + w - 1, y - b); - fl_color(shade_color(g[*c++], bc)); + fl_color(shade_color(g[(int)*c++], bc)); fl_line(x + w - 1, y - b, x, y - b, x - b, y); - fl_color(shade_color(g[*c++], bc)); + fl_color(shade_color(g[(int)*c++], bc)); fl_line(x - b, y, x - b, y + h, x, y + h + b); } } @@ -106,45 +106,45 @@ static void frame_round(int x, int y, int w, int h, const char *c, Fl_Color bc) if (w==h) { for (; b > 1; b --, x ++, y ++, w -= 2, h -= 2) { - fl_color(shade_color(g[*c++], bc)); + fl_color(shade_color(g[(int)*c++], bc)); fl_arc(x, y, w, h, 45.0, 135.0); - fl_color(shade_color(g[*c++], bc)); + fl_color(shade_color(g[(int)*c++], bc)); fl_arc(x, y, w, h, 315.0, 405.0); - fl_color(shade_color(g[*c++], bc)); + fl_color(shade_color(g[(int)*c++], bc)); fl_arc(x, y, w, h, 225.0, 315.0); - fl_color(shade_color(g[*c++], bc)); + fl_color(shade_color(g[(int)*c++], bc)); fl_arc(x, y, w, h, 135.0, 225.0); } } else if (w>h) { int d = h/2; for (; b > 1; d--, b --, x ++, y ++, w -= 2, h -= 2) { - fl_color(shade_color(g[*c++], bc)); + fl_color(shade_color(g[(int)*c++], bc)); fl_arc(x, y, h, h, 90.0, 135.0); fl_xyline(x+d, y, x+w-d); fl_arc(x+w-h, y, h, h, 45.0, 90.0); - fl_color(shade_color(g[*c++], bc)); + fl_color(shade_color(g[(int)*c++], bc)); fl_arc(x+w-h, y, h, h, 315.0, 405.0); - fl_color(shade_color(g[*c++], bc)); + fl_color(shade_color(g[(int)*c++], bc)); fl_arc(x+w-h, y, h, h, 270.0, 315.0); fl_xyline(x+d, y+h-1, x+w-d); fl_arc(x, y, h, h, 225.0, 270.0); - fl_color(shade_color(g[*c++], bc)); + fl_color(shade_color(g[(int)*c++], bc)); fl_arc(x, y, h, h, 135.0, 225.0); } } else if (w<h) { int d = w/2; for (; b > 1; d--, b --, x ++, y ++, w -= 2, h -= 2) { - fl_color(shade_color(g[*c++], bc)); + fl_color(shade_color(g[(int)*c++], bc)); fl_arc(x, y, w, w, 45.0, 135.0); - fl_color(shade_color(g[*c++], bc)); + fl_color(shade_color(g[(int)*c++], bc)); fl_arc(x, y, w, w, 0.0, 45.0); fl_yxline(x+w-1, y+d, y+h-d); fl_arc(x, y+h-w, w, w, 315.0, 360.0); - fl_color(shade_color(g[*c++], bc)); + fl_color(shade_color(g[(int)*c++], bc)); fl_arc(x, y+h-w, w, w, 225.0, 315.0); - fl_color(shade_color(g[*c++], bc)); + fl_color(shade_color(g[(int)*c++], bc)); fl_arc(x, y+h-w, w, w, 180.0, 225.0); fl_yxline(x, y+d, y+h-d); fl_arc(x, y, w, w, 135.0, 180.0); @@ -166,7 +166,7 @@ static void shade_rect(int x, int y, int w, int h, const char *c, Fl_Color bc) { for (i = 0, j = 0; j < chalf; i ++, j += cstep) { // Draw the top line and points... - fl_color(shade_color(g[c[i]], bc)); + fl_color(shade_color(g[(int)c[i]], bc)); fl_xyline(x + 1, y + i, x + w - 2); fl_color(shade_color(g[c[i] - 2], bc)); @@ -174,7 +174,7 @@ static void shade_rect(int x, int y, int w, int h, const char *c, Fl_Color bc) { fl_point(x + w - 1, y + i + 1); // Draw the bottom line and points... - fl_color(shade_color(g[c[clen - i]], bc)); + fl_color(shade_color(g[(int)c[clen - i]], bc)); fl_xyline(x + 1, y + h - i, x + w - 2); fl_color(shade_color(g[c[clen - i] - 2], bc)); @@ -185,7 +185,7 @@ static void shade_rect(int x, int y, int w, int h, const char *c, Fl_Color bc) { // Draw the interior and sides... i = chalf / cstep; - fl_color(shade_color(g[c[chalf]], bc)); + fl_color(shade_color(g[(int)c[chalf]], bc)); fl_rectf(x + 1, y + i, w - 2, h - 2 * i + 1); fl_color(shade_color(g[c[chalf] - 2], bc)); @@ -197,7 +197,7 @@ static void shade_rect(int x, int y, int w, int h, const char *c, Fl_Color bc) { for (i = 0, j = 0; j < chalf; i ++, j += cstep) { // Draw the left line and points... - fl_color(shade_color(g[c[i]], bc)); + fl_color(shade_color(g[(int)c[i]], bc)); fl_yxline(x + i, y + 1, y + h - 1); fl_color(shade_color(g[c[i] - 2], bc)); @@ -205,7 +205,7 @@ static void shade_rect(int x, int y, int w, int h, const char *c, Fl_Color bc) { fl_point(x + i + 1, y + h); // Draw the right line and points... - fl_color(shade_color(g[c[clen - i]], bc)); + fl_color(shade_color(g[(int)c[clen - i]], bc)); fl_yxline(x + w - 1 - i, y + 1, y + h - 1); fl_color(shade_color(g[c[clen - i] - 2], bc)); @@ -216,7 +216,7 @@ static void shade_rect(int x, int y, int w, int h, const char *c, Fl_Color bc) { // Draw the interior, top, and bottom... i = chalf / cstep; - fl_color(shade_color(g[c[chalf]], bc)); + fl_color(shade_color(g[(int)c[chalf]], bc)); fl_rectf(x + i, y + 1, w - 2 * i, h - 1); fl_color(shade_color(g[c[chalf] - 2], bc)); @@ -236,20 +236,20 @@ static void shade_round(int x, int y, int w, int h, const char *c, Fl_Color bc) const int na = 8; for (i=0; i<chalf; i++, d--, x++, y++, w-=2, h-=2) { - fl_color(shade_color(g[c[i]], bc)); + fl_color(shade_color(g[(int)c[i]], bc)); fl_pie(x, y, h, h, 90.0, 135.0+i*na); fl_xyline(x+d, y, x+w-d); fl_pie(x+w-h, y, h, h, 45.0+i*na, 90.0); - fl_color(shade_color(g[c[i] - 2], bc)); + fl_color(shade_color(g[(int)c[i] - 2], bc)); fl_pie(x+w-h, y, h, h, 315.0+i*na, 405.0+i*na); - fl_color(shade_color(g[c[clen - i]], bc)); + fl_color(shade_color(g[(int)c[clen - i]], bc)); fl_pie(x+w-h, y, h, h, 270.0, 315.0+i*na); fl_xyline(x+d, y+h-1, x+w-d); fl_pie(x, y, h, h, 225.0+i*na, 270.0); - fl_color(shade_color(g[c[clen - i] - 2], bc)); + fl_color(shade_color(g[c[(int)clen - i] - 2], bc)); fl_pie(x, y, h, h, 135.0+i*na, 225.0+i*na); } - fl_color(shade_color(g[c[chalf]], bc)); + fl_color(shade_color(g[(int)c[chalf]], bc)); fl_rectf(x+d, y, w-h+1, h+1); fl_pie(x, y, h, h, 90.0, 270.0); fl_pie(x+w-h, y, h, h, 270.0, 90.0); @@ -258,20 +258,20 @@ static void shade_round(int x, int y, int w, int h, const char *c, Fl_Color bc) const int na = 8; for (i=0; i<chalf; i++, d--, x++, y++, w-=2, h-=2) { - fl_color(shade_color(g[c[i]], bc)); + fl_color(shade_color(g[(int)c[i]], bc)); fl_pie(x, y, w, w, 45.0+i*na, 135.0+i*na); fl_color(shade_color(g[c[i] - 2], bc)); fl_pie(x, y, w, w, 0.0, 45.0+i*na); fl_yxline(x+w-1, y+d, y+h-d); fl_pie(x, y+h-w, w, w, 315.0+i*na, 360.0); - fl_color(shade_color(g[c[clen - i]], bc)); + fl_color(shade_color(g[(int)c[clen - i]], bc)); fl_pie(x, y+h-w, w, w, 225.0+i*na, 315.0+i*na); fl_color(shade_color(g[c[clen - i] - 2], bc)); fl_pie(x, y+h-w, w, w, 180.0, 225.0+i*na); fl_yxline(x, y+d, y+h-d); fl_pie(x, y, w, w, 135.0+i*na, 180.0); } - fl_color(shade_color(g[c[chalf]], bc)); + fl_color(shade_color(g[(int)c[chalf]], bc)); fl_rectf(x, y+d, w+1, h-w+1); fl_pie(x, y, w, w, 0.0, 180.0); fl_pie(x, y+h-w, w, w, 180.0, 360.0); |
