Fixed VS compilation errors and warnings.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/uni@13370 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -115,7 +115,7 @@ void CGUISTKListBox::removeItem(u32 id)
|
||||
else if ((u32)Selected > id)
|
||||
{
|
||||
Selected -= 1;
|
||||
selectTime = Time::getTimeSinceEpoch();
|
||||
selectTime = (u32)Time::getTimeSinceEpoch();
|
||||
}
|
||||
|
||||
Items.erase(id);
|
||||
@@ -205,7 +205,7 @@ void CGUISTKListBox::setSelected(s32 id)
|
||||
else
|
||||
Selected = id;
|
||||
|
||||
selectTime = Time::getTimeSinceEpoch();
|
||||
selectTime = (u32)Time::getTimeSinceEpoch();
|
||||
|
||||
recalculateScrollPos();
|
||||
}
|
||||
@@ -397,7 +397,7 @@ bool CGUISTKListBox::OnEvent(const SEvent& event)
|
||||
|
||||
void CGUISTKListBox::selectNew(s32 ypos, bool onlyHover)
|
||||
{
|
||||
u32 now = Time::getTimeSinceEpoch();
|
||||
u32 now = (u32)Time::getTimeSinceEpoch();
|
||||
s32 oldSelected = Selected;
|
||||
|
||||
Selected = getItemAt(AbsoluteRect.UpperLeftCorner.X, ypos);
|
||||
@@ -486,13 +486,13 @@ void CGUISTKListBox::draw()
|
||||
if (Font)
|
||||
{
|
||||
int total_proportion = 0;
|
||||
for(int x = 0; x < Items[i].m_contents.size(); ++x)
|
||||
for(unsigned int x = 0; x < Items[i].m_contents.size(); ++x)
|
||||
{
|
||||
total_proportion += Items[i].m_contents[x].m_proportion;
|
||||
}
|
||||
int part_size = (int)(textRect.getWidth() / float(total_proportion));
|
||||
|
||||
for(int x = 0; x < Items[i].m_contents.size(); ++x)
|
||||
for(unsigned int x = 0; x < Items[i].m_contents.size(); ++x)
|
||||
{
|
||||
textRect.LowerRightCorner.X = textRect.UpperLeftCorner.X +
|
||||
(Items[i].m_contents[x].m_proportion * part_size);
|
||||
@@ -511,7 +511,7 @@ void CGUISTKListBox::draw()
|
||||
iconPos, &clientClip,
|
||||
hasItemOverrideColor(i, EGUI_LBC_ICON_HIGHLIGHT) ?
|
||||
getItemOverrideColor(i, EGUI_LBC_ICON_HIGHLIGHT) : getItemDefaultColor(EGUI_LBC_ICON_HIGHLIGHT),
|
||||
selectTime, Time::getTimeSinceEpoch(), false, true);
|
||||
selectTime, (u32)Time::getTimeSinceEpoch(), false, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -520,7 +520,7 @@ void CGUISTKListBox::draw()
|
||||
iconPos,
|
||||
&clientClip,
|
||||
hasItemOverrideColor(i, EGUI_LBC_ICON) ? getItemOverrideColor(i, EGUI_LBC_ICON) : getItemDefaultColor(EGUI_LBC_ICON),
|
||||
0 , (i==Selected) ? Time::getTimeSinceEpoch() : 0, false, true);
|
||||
0 , (i==Selected) ? (u32)Time::getTimeSinceEpoch() : 0, false, true);
|
||||
}
|
||||
textRect.UpperLeftCorner.X += ItemsIconWidth;
|
||||
}
|
||||
|
||||
@@ -19,20 +19,22 @@
|
||||
#ifndef HTTP_MANAGER_HPP
|
||||
#define HTTP_MANAGER_HPP
|
||||
|
||||
#include <string>
|
||||
#include <curl/curl.h>
|
||||
#include <irrString.h>
|
||||
#include <queue>
|
||||
#include <pthread.h>
|
||||
#include "io/xml_node.hpp"
|
||||
#include "online/request.hpp"
|
||||
#include "utils/string_utils.hpp"
|
||||
#include "utils/synchronised.hpp"
|
||||
|
||||
#include <irrString.h>
|
||||
|
||||
#include <string>
|
||||
#ifdef WIN32
|
||||
# include <winsock2.h>
|
||||
#endif
|
||||
|
||||
#include "io/xml_node.hpp"
|
||||
#include "utils/string_utils.hpp"
|
||||
#include "utils/synchronised.hpp"
|
||||
#include "online/request.hpp"
|
||||
#include <curl/curl.h>
|
||||
#include <queue>
|
||||
#include <pthread.h>
|
||||
|
||||
|
||||
namespace Online{
|
||||
|
||||
|
||||
@@ -16,10 +16,15 @@
|
||||
|
||||
#include "online/request.hpp"
|
||||
|
||||
#include "online/http_manager.hpp"
|
||||
#include "utils/translation.hpp"
|
||||
|
||||
#ifdef WIN32
|
||||
# include <winsock2.h>
|
||||
#endif
|
||||
|
||||
#include <curl/curl.h>
|
||||
#include <assert.h>
|
||||
#include <online/http_manager.hpp>
|
||||
#include <utils/translation.hpp>
|
||||
|
||||
|
||||
namespace Online{
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace Online{
|
||||
{
|
||||
addServer(new Server(*servers_xml->getNode(i)));
|
||||
}
|
||||
m_last_load_time.setAtomic(Time::getRealTime());
|
||||
m_last_load_time.setAtomic((float)Time::getRealTime());
|
||||
}
|
||||
//FIXME error message
|
||||
}
|
||||
@@ -107,7 +107,8 @@ namespace Online{
|
||||
{
|
||||
/*if(m_sorted_servers.size() > 0)
|
||||
return getServerBySort(0);
|
||||
return NULL;*/
|
||||
*/
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user