summaryrefslogtreecommitdiff
path: root/src/Fl_Text_Display.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2010-12-15 09:21:14 +0000
committerManolo Gouy <Manolo>2010-12-15 09:21:14 +0000
commit37d1838d075fcd649138bfaae70f0a932c500e95 (patch)
tree6c5ca81f5894a9807ff1c9483813bdcc77864495 /src/Fl_Text_Display.cxx
parent0ba139d3490d6e999d407f40f88aa2f72ce9ea4a (diff)
Removed MSWin compiler warnings
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8030 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Text_Display.cxx')
-rw-r--r--src/Fl_Text_Display.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx
index 2463bb022..08566d840 100644
--- a/src/Fl_Text_Display.cxx
+++ b/src/Fl_Text_Display.cxx
@@ -1743,7 +1743,7 @@ int Fl_Text_Display::handle_vline(
int w = 0;
if (prevChar=='\t') {
// draw a single Tab space
- int tab = col_to_x(8);
+ int tab = (int)col_to_x(8);
int xAbs = (mode==GET_WIDTH) ? startX : startX+mHorizOffset-text_area.x;
w = (((xAbs/tab)+1)*tab) - xAbs;
if (mode==DRAW_LINE)
@@ -1776,7 +1776,7 @@ int Fl_Text_Display::handle_vline(
int w = 0;
if (currChar=='\t') {
// draw a single Tab space
- int tab = col_to_x(8);
+ int tab = (int)col_to_x(8);
int xAbs = (mode==GET_WIDTH) ? startX : startX+mHorizOffset-text_area.x;
w = (((xAbs/tab)+1)*tab) - xAbs;
if (mode==DRAW_LINE)
@@ -3117,7 +3117,7 @@ void Fl_Text_Display::wrapped_line_counter(Fl_Text_Buffer *buf, int startPos,
// FIXME: it is not a good idea to simply add character widths because on
// some platforms, the width is a floating point value and depends on the
// previous character as well.
- width += measure_proportional_character(s, width, p+styleBufOffset);
+ width += measure_proportional_character(s, (int)width, p+styleBufOffset);
}
/* If character exceeded wrap margin, find the break point and wrap there */
@@ -3131,7 +3131,7 @@ void Fl_Text_Display::wrapped_line_counter(Fl_Text_Buffer *buf, int startPos,
width = 0;
int iMax = buf->next_char(p);
for (i=buf->next_char(b); i<iMax; i = buf->next_char(i)) {
- width += measure_proportional_character(buf->address(i), width,
+ width += measure_proportional_character(buf->address(i), (int)width,
i+styleBufOffset);
colNum++;
}
@@ -3200,7 +3200,7 @@ double Fl_Text_Display::measure_proportional_character(const char *s, int xPix,
IS_UTF8_ALIGNED(s)
if (*s=='\t') {
- int tab = col_to_x(8);
+ int tab = (int)col_to_x(8);
return (((xPix/tab)+1)*tab) - xPix;
}