From fc5ddb2ad0f4dde854816a4452f1456e261cc6ff Mon Sep 17 00:00:00 2001 From: hikerstk Date: Mon, 21 Mar 2011 05:19:42 +0000 Subject: [PATCH] Fixed compiler warnings. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8012 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/guiengine/scalable_font.cpp | 2 +- src/guiengine/widgets/ribbon_widget.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/guiengine/scalable_font.cpp b/src/guiengine/scalable_font.cpp index 1dc26aa36..934ea4f67 100644 --- a/src/guiengine/scalable_font.cpp +++ b/src/guiengine/scalable_font.cpp @@ -505,7 +505,7 @@ void ScalableFont::draw(const core::stringw& text, c == L'\n' ) // Unix breaks { if(c==L'\r' && text[i+1]==L'\n') c = text[++i]; - offset.Y += MaxHeight*m_scale; + offset.Y += (int)(MaxHeight*m_scale); offset.X = position.UpperLeftCorner.X; if (hcenter) offset.X += (position.getWidth() - text_dimension.Width) >> 1; diff --git a/src/guiengine/widgets/ribbon_widget.cpp b/src/guiengine/widgets/ribbon_widget.cpp index 9594efe12..577ae33b3 100644 --- a/src/guiengine/widgets/ribbon_widget.cpp +++ b/src/guiengine/widgets/ribbon_widget.cpp @@ -127,7 +127,9 @@ void RibbonWidget::add() // ---- tab ribbons if (getRibbonType() == RIBBON_TABS) { - const int large_tab = (with_label + without_label)*one_button_space / (with_label + without_label/2.0f); + const int large_tab = (int)((with_label + without_label) + *one_button_space + / (with_label + without_label/2.0f)); const int small_tab = large_tab/2; stringw& message = m_children[i].m_text;