diff options
| author | Greg Ercolano <erco@seriss.com> | 2010-11-15 04:49:46 +0000 |
|---|---|---|
| committer | Greg Ercolano <erco@seriss.com> | 2010-11-15 04:49:46 +0000 |
| commit | 7b9a2e88ad59b4955c46065df480ac70353088ae (patch) | |
| tree | c593003778a3d3779a8f0379cd3e40a6c2351a39 /src/fl_font_mac.cxx | |
| parent | 1c06cb428359629b485a1dedf77474db9fb3fa69 (diff) | |
Solves STR #2428: Silence float->int conversion warnings
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7836 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_font_mac.cxx')
| -rw-r--r-- | src/fl_font_mac.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/fl_font_mac.cxx b/src/fl_font_mac.cxx index 53ae93d74..b02de3351 100644 --- a/src/fl_font_mac.cxx +++ b/src/fl_font_mac.cxx @@ -129,8 +129,8 @@ else { float fa = -FixedToFloat(bAscent), fd = -FixedToFloat(bDescent); if (fa>0.0f && fd>0.0f) { //float f = Size/(fa+fd); - ascent = fa; //int(fa*f+0.5f); - descent = fd; //Size - ascent; + ascent = int(fa); //int(fa*f+0.5f); + descent = int(fd); //Size - ascent; } int w = FixedToInt(bAfter); if (w) @@ -335,8 +335,8 @@ void fl_text_extents(const UniChar* txt, int n, int &dx, int &dy, int &w, int &h if (!fl_fontsize) { check_default_font(); // avoid a crash! if (!fl_fontsize) - w = 8.0 * n; // user must select a font first! - h = 8.0; + w = int(8.0 * n); // user must select a font first! + h = int(8.0); return; } #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 @@ -493,7 +493,7 @@ void Fl_Graphics_Driver::draw(int angle, const char *str, int n, int x, int y) { } void Fl_Graphics_Driver::rtl_draw(const char* c, int n, int x, int y) { - draw(c, n, x - fl_width(c, n), y); + draw(c, n, int(x - fl_width(c, n)), y); } // |
