Author: greg.ercolano
Date: 2010-11-15 00:01:06 -0800 (Mon, 15 Nov 2010)
New Revision: 7838
Log:
Solves STR #2428: Silence double->int conversion warnings
Modified:
branches/branch-1.3/src/Fl_Text_Display.cxx
Modified: branches/branch-1.3/src/Fl_Text_Display.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Text_Display.cxx 2010-11-15 07:14:29 UTC (rev
7837)
+++ branches/branch-1.3/src/Fl_Text_Display.cxx 2010-11-15 08:01:06 UTC (rev
7838)
@@ -672,7 +672,7 @@
break;
case WRAP_AT_COLUMN:
default:
- mWrapMarginPix = col_to_x(wrapMargin);
+ mWrapMarginPix = int(col_to_x(wrapMargin));
mContinuousWrap = 1;
break;
case WRAP_AT_PIXEL:
@@ -1747,7 +1747,7 @@
// FIXME: if the character is an optional hyphen, we need to ignore it
unless we wrap the text
if (charStyle!=style) {
// draw a segment whenever the style changes
- int w = string_width( lineStr+startIndex, i-startIndex, style );
+ int w = int( string_width( lineStr+startIndex, i-startIndex, style ) );
if (mode==DRAW_LINE)
draw_string( style, startX, Y, startX+w, lineStr+startIndex,
i-startIndex );
if (mode==FIND_INDEX && startX+w>rightClip) {
@@ -1767,7 +1767,7 @@
}
i += len;
}
- int w = string_width( lineStr+startIndex, i-startIndex, style );
+ int w = int( string_width( lineStr+startIndex, i-startIndex, style ) );
if (mode==DRAW_LINE)
draw_string( style, startX, Y, startX+w, lineStr+startIndex, i-startIndex
);
if (mode==FIND_INDEX) {
@@ -1809,7 +1809,7 @@
int i = 0;
while (i<len) {
int cl = fl_utf8len(s[i]);
- int w = string_width(s, i+cl, style);
+ int w = int( string_width(s, i+cl, style) );
if (w>x)
return i;
i += cl;
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit