Removed compiler warnings.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9098 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2011-06-26 23:03:50 +00:00
parent 0631de56d0
commit 73d93cc559
2 changed files with 5 additions and 3 deletions

View File

@ -481,7 +481,7 @@ void ScalableFont::draw(const core::stringw& text,
const int where = text.findFirst(L'\t'); const int where = text.findFirst(L'\t');
core::stringw substr = text.subString(0, where-1); core::stringw substr = text.subString(0, where-1);
text_dimension = getDimension(substr.c_str()) + getDimension(L"XX"); 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 // ---- 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 //hack: one tab character is supported, it moves the cursor to the tab stop
if (c == L'\t') 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; continue;
} }

View File

@ -121,7 +121,8 @@ void ListWidget::add()
header->m_h = header_height; header->m_h = header_height;
header->m_x = x; 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; x += header->m_w;