From 023bc44abd1b584d4e8f8b84dc5bf9cafdad8f21 Mon Sep 17 00:00:00 2001 From: Aloshi Date: Fri, 14 Jun 2013 06:26:04 -0500 Subject: [PATCH] Fixed a warning. --- src/Font.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Font.cpp b/src/Font.cpp index 02eff9d3b..2a0b34b38 100644 --- a/src/Font.cpp +++ b/src/Font.cpp @@ -341,7 +341,7 @@ void Font::drawText(std::string text, int startx, int starty, int color) void Font::sizeText(std::string text, int* w, int* h) { - int cwidth = 0; + float cwidth = 0.0f; for(unsigned int i = 0; i < text.length(); i++) { unsigned char letter = text[i]; @@ -352,10 +352,10 @@ void Font::sizeText(std::string text, int* w, int* h) } if(w != NULL) - *w = cwidth; + *w = (int)cwidth; if(h != NULL) - *h = (int)(mMaxGlyphHeight * 1.5f * fontScale); + *h = getHeight(); } int Font::getHeight()