From 73d93cc5593c9486a2f0bbe77e2963240e0816e8 Mon Sep 17 00:00:00 2001 From: hikerstk Date: Sun, 26 Jun 2011 23:03:50 +0000 Subject: [PATCH] Removed compiler warnings. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9098 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/guiengine/scalable_font.cpp | 5 +++-- src/guiengine/widgets/list_widget.cpp | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/guiengine/scalable_font.cpp b/src/guiengine/scalable_font.cpp index 0ce46e984..592dadc68 100644 --- a/src/guiengine/scalable_font.cpp +++ b/src/guiengine/scalable_font.cpp @@ -481,7 +481,7 @@ void ScalableFont::draw(const core::stringw& text, const int where = text.findFirst(L'\t'); core::stringw substr = text.subString(0, where-1); text_dimension = getDimension(substr.c_str()) + getDimension(L"XX"); - offset.X += (position.getWidth()*m_tab_stop - text_dimension.Width); + offset.X += (int)(position.getWidth()*m_tab_stop-text_dimension.Width); } // ---- collect character locations @@ -497,7 +497,8 @@ void ScalableFont::draw(const core::stringw& text, //hack: one tab character is supported, it moves the cursor to the tab stop if (c == L'\t') { - offset.X = position.UpperLeftCorner.X + position.getWidth()*m_tab_stop; + offset.X = (int)(position.UpperLeftCorner.X + + position.getWidth()*m_tab_stop); continue; } diff --git a/src/guiengine/widgets/list_widget.cpp b/src/guiengine/widgets/list_widget.cpp index d2502cb8b..6af481f5f 100644 --- a/src/guiengine/widgets/list_widget.cpp +++ b/src/guiengine/widgets/list_widget.cpp @@ -121,7 +121,8 @@ void ListWidget::add() header->m_h = header_height; header->m_x = x; - header->m_w = m_w * float(m_header[n].m_proportion)/float(proportion_total); + header->m_w = (int)(m_w * float(m_header[n].m_proportion) + /float(proportion_total)); x += header->m_w;