mirror of
https://github.com/fltk/fltk.git
synced 2026-05-28 20:06:18 +08:00
Remove warnings found by Robin Rowe's settings for VC7. I do not have VC7, but I believe I managed to find and fix them all... .
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5164 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
+7
-7
@@ -246,7 +246,7 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) {
|
|||||||
p = value();
|
p = value();
|
||||||
// visit each line and draw it:
|
// visit each line and draw it:
|
||||||
int desc = height-fl_descent();
|
int desc = height-fl_descent();
|
||||||
float xpos = X - xscroll_ + 1;
|
float xpos = (float)(X - xscroll_ + 1);
|
||||||
int ypos = -yscroll_;
|
int ypos = -yscroll_;
|
||||||
for (; ypos < H;) {
|
for (; ypos < H;) {
|
||||||
|
|
||||||
@@ -261,14 +261,14 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) {
|
|||||||
if (readonly()) erase_cursor_only = 0; // this isn't the most efficient way
|
if (readonly()) erase_cursor_only = 0; // this isn't the most efficient way
|
||||||
if (erase_cursor_only && p > pp) goto CONTINUE2; // this line is after
|
if (erase_cursor_only && p > pp) goto CONTINUE2; // this line is after
|
||||||
// calculate area to erase:
|
// calculate area to erase:
|
||||||
float r = X+W;
|
float r = (float)(X+W);
|
||||||
float xx;
|
float xx;
|
||||||
if (p >= pp) {
|
if (p >= pp) {
|
||||||
xx = X;
|
xx = (float)X;
|
||||||
if (erase_cursor_only) r = xpos+2;
|
if (erase_cursor_only) r = xpos+2;
|
||||||
else if (readonly()) xx -= 3;
|
else if (readonly()) xx -= 3;
|
||||||
} else {
|
} else {
|
||||||
xx = xpos+expandpos(p, pp, buf, 0);
|
xx = xpos + (float)expandpos(p, pp, buf, 0);
|
||||||
if (erase_cursor_only) r = xx+2;
|
if (erase_cursor_only) r = xx+2;
|
||||||
else if (readonly()) xx -= 3;
|
else if (readonly()) xx -= 3;
|
||||||
}
|
}
|
||||||
@@ -288,13 +288,13 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) {
|
|||||||
int offset1 = 0;
|
int offset1 = 0;
|
||||||
if (pp > p) {
|
if (pp > p) {
|
||||||
fl_color(tc);
|
fl_color(tc);
|
||||||
x1 += expandpos(p, pp, buf, &offset1);
|
x1 += (float)expandpos(p, pp, buf, &offset1);
|
||||||
fl_draw(buf, offset1, xpos, (float)(Y+ypos+desc));
|
fl_draw(buf, offset1, xpos, (float)(Y+ypos+desc));
|
||||||
}
|
}
|
||||||
pp = value()+selend;
|
pp = value()+selend;
|
||||||
float x2 = X+W;
|
float x2 = (float)(X+W);
|
||||||
int offset2;
|
int offset2;
|
||||||
if (pp <= e) x2 = xpos+expandpos(p, pp, buf, &offset2);
|
if (pp <= e) x2 = xpos + (float)expandpos(p, pp, buf, &offset2);
|
||||||
else offset2 = strlen(buf);
|
else offset2 = strlen(buf);
|
||||||
fl_color(selection_color());
|
fl_color(selection_color());
|
||||||
fl_rectf((int)(x1+0.5), Y+ypos, (int)(x2-x1+0.5), height);
|
fl_rectf((int)(x1+0.5), Y+ypos, (int)(x2-x1+0.5), height);
|
||||||
|
|||||||
@@ -55,11 +55,11 @@ fl_read_image(uchar *p, // I - Pixel buffer or NULL to allocate
|
|||||||
for (x = 0; x < w; x ++, ptr += d) {
|
for (x = 0; x < w; x ++, ptr += d) {
|
||||||
COLORREF c = GetPixel(fl_gc, X + x, Y + y);
|
COLORREF c = GetPixel(fl_gc, X + x, Y + y);
|
||||||
|
|
||||||
ptr[0] = c;
|
ptr[0] = (uchar)c;
|
||||||
c >>= 8;
|
c >>= 8;
|
||||||
ptr[1] = c;
|
ptr[1] = (uchar)c;
|
||||||
c >>= 8;
|
c >>= 8;
|
||||||
ptr[2] = c;
|
ptr[2] = (uchar)c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user