Fixed compiler warnings.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7246 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2011-01-04 04:35:35 +00:00
parent 7fe57b9802
commit 54b7d57d63
2 changed files with 5 additions and 5 deletions

View File

@ -314,7 +314,7 @@ int NetworkHttp::progressDownload(void *clientp,
float f;
if(download_now < download_total)
{
f = download_now / download_total;
f = (float)download_now / (float)download_total;
// In case of floating point rouding errors make sure that
// 1.0 is only reached when downloadFileInternal is finished
if (f>=1.0f) f=0.99f;

View File

@ -307,7 +307,7 @@ void LayoutManager::calculateLayout(ptr_vector<Widget>& widgets, AbstractTopLeve
if (prop_y[ prop_y.size()-1 ] == '%')
{
prop_y = prop_y.substr(0, prop_y.size() - 1);
widgets[n].m_y = y + atoi(prop_y.c_str())/100.0f * h;
widgets[n].m_y = (int)(y + atoi(prop_y.c_str())/100.0f * h);
}
else
{
@ -366,7 +366,7 @@ void LayoutManager::calculateLayout(ptr_vector<Widget>& widgets, AbstractTopLeve
if (prop_x[ prop_x.size()-1 ] == '%')
{
prop_x = prop_x.substr(0, prop_x.size() - 1);
widgets[n].m_x = x + atoi(prop_x.c_str())/100.0f * w;
widgets[n].m_x = (int)(x + atoi(prop_x.c_str())/100.0f * w);
}
else
{
@ -420,7 +420,7 @@ void LayoutManager::calculateLayout(ptr_vector<Widget>& widgets, AbstractTopLeve
if (prop_y[ prop_y.size()-1 ] == '%')
{
prop_y = prop_y.substr(0, prop_y.size() - 1);
widgets[n].m_y = y + atoi(prop_y.c_str())/100.0f * h;
widgets[n].m_y = (int)(y + atoi(prop_y.c_str())/100.0f * h);
}
else
{
@ -466,7 +466,7 @@ void LayoutManager::calculateLayout(ptr_vector<Widget>& widgets, AbstractTopLeve
if (prop_x[ prop_x.size()-1 ] == '%')
{
prop_x = prop_x.substr(0, prop_x.size() - 1);
widgets[n].m_x = x + atoi(prop_x.c_str())/100.0f * w;
widgets[n].m_x = (int)(x + atoi(prop_x.c_str())/100.0f * w);
}
else
{