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:
parent
7fe57b9802
commit
54b7d57d63
@ -314,7 +314,7 @@ int NetworkHttp::progressDownload(void *clientp,
|
|||||||
float f;
|
float f;
|
||||||
if(download_now < download_total)
|
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
|
// In case of floating point rouding errors make sure that
|
||||||
// 1.0 is only reached when downloadFileInternal is finished
|
// 1.0 is only reached when downloadFileInternal is finished
|
||||||
if (f>=1.0f) f=0.99f;
|
if (f>=1.0f) f=0.99f;
|
||||||
|
@ -307,7 +307,7 @@ void LayoutManager::calculateLayout(ptr_vector<Widget>& widgets, AbstractTopLeve
|
|||||||
if (prop_y[ prop_y.size()-1 ] == '%')
|
if (prop_y[ prop_y.size()-1 ] == '%')
|
||||||
{
|
{
|
||||||
prop_y = prop_y.substr(0, 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
|
else
|
||||||
{
|
{
|
||||||
@ -366,7 +366,7 @@ void LayoutManager::calculateLayout(ptr_vector<Widget>& widgets, AbstractTopLeve
|
|||||||
if (prop_x[ prop_x.size()-1 ] == '%')
|
if (prop_x[ prop_x.size()-1 ] == '%')
|
||||||
{
|
{
|
||||||
prop_x = prop_x.substr(0, 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
|
else
|
||||||
{
|
{
|
||||||
@ -420,7 +420,7 @@ void LayoutManager::calculateLayout(ptr_vector<Widget>& widgets, AbstractTopLeve
|
|||||||
if (prop_y[ prop_y.size()-1 ] == '%')
|
if (prop_y[ prop_y.size()-1 ] == '%')
|
||||||
{
|
{
|
||||||
prop_y = prop_y.substr(0, 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
|
else
|
||||||
{
|
{
|
||||||
@ -466,7 +466,7 @@ void LayoutManager::calculateLayout(ptr_vector<Widget>& widgets, AbstractTopLeve
|
|||||||
if (prop_x[ prop_x.size()-1 ] == '%')
|
if (prop_x[ prop_x.size()-1 ] == '%')
|
||||||
{
|
{
|
||||||
prop_x = prop_x.substr(0, 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
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user