Fixed some 64-bit related compiler warnings.
This commit is contained in:
@@ -502,7 +502,7 @@ void SFXManager::loadSfx()
|
||||
delete root;
|
||||
|
||||
// Now load them in parallel
|
||||
const int max = m_all_sfx_types.size();
|
||||
const int max = (int)m_all_sfx_types.size();
|
||||
SFXBuffer **array = new SFXBuffer *[max];
|
||||
i = 0;
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ void SavedGrandPrix::loadKarts(std::vector<RaceManager::KartStatus> & kart_list)
|
||||
else
|
||||
{
|
||||
// Get correct player
|
||||
for(unsigned int x = kart_list.size()-m_player_karts;
|
||||
for(unsigned int x = (unsigned int)kart_list.size()-m_player_karts;
|
||||
x < kart_list.size(); x++)
|
||||
{
|
||||
if(kart_list[x].m_local_player_id == m_karts[i].m_local_player_id)
|
||||
|
||||
@@ -122,7 +122,7 @@ void GroupUserConfigParam::writeInner(std::ofstream& stream, int level) const
|
||||
{
|
||||
std::string tab(level * 4,' ');
|
||||
for(int i = 0; i < level; i++) tab =+ " ";
|
||||
const int children_amount = m_attributes.size();
|
||||
const int children_amount = (int)m_attributes.size();
|
||||
|
||||
stream << " " << tab.c_str() << "<" << m_param_name.c_str() << "\n";
|
||||
|
||||
@@ -144,7 +144,7 @@ void GroupUserConfigParam::findYourDataInAChildOf(const XMLNode* node)
|
||||
return;
|
||||
}
|
||||
|
||||
const int attributes_amount = m_attributes.size();
|
||||
const int attributes_amount = (int)m_attributes.size();
|
||||
for (int n=0; n<attributes_amount; n++)
|
||||
{
|
||||
m_attributes[n]->findYourDataInAnAttributeOf(child);
|
||||
@@ -246,7 +246,7 @@ ListUserConfigParam<T, U>::ListUserConfigParam(const char* param_name,
|
||||
template<typename T, typename U>
|
||||
void ListUserConfigParam<T, U>::write(std::ofstream& stream) const
|
||||
{
|
||||
const int elts_amount = m_elements.size();
|
||||
const int elts_amount = (int)m_elements.size();
|
||||
|
||||
// comment
|
||||
if(m_comment.size() > 0) stream << " <!-- " << m_comment.c_str();
|
||||
@@ -728,7 +728,7 @@ bool UserConfig::loadConfig()
|
||||
UserConfigParams::m_saved_grand_prix_list.clearAndDeleteAll();
|
||||
std::vector<XMLNode*> saved_gps;
|
||||
root->getNodes("SavedGP", saved_gps);
|
||||
const int gp_amount = saved_gps.size();
|
||||
const int gp_amount = (int)saved_gps.size();
|
||||
for (int i=0; i<gp_amount; i++)
|
||||
{
|
||||
UserConfigParams::m_saved_grand_prix_list.push_back(
|
||||
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
FT_Face getFace(unsigned int i) const;
|
||||
// ------------------------------------------------------------------------
|
||||
/** Return the total TTF files loaded. */
|
||||
unsigned int getTotalFaces() const { return m_faces.size(); }
|
||||
unsigned int getTotalFaces() const { return (unsigned int)m_faces.size(); }
|
||||
|
||||
}; // FaceTTF
|
||||
|
||||
|
||||
@@ -340,8 +340,8 @@ public:
|
||||
// ------------------------------------------------------------------------
|
||||
int getScore(SoccerTeam team) const
|
||||
{
|
||||
return (team == SOCCER_TEAM_BLUE ? m_blue_scorers.size() :
|
||||
m_red_scorers.size());
|
||||
return (int)(team == SOCCER_TEAM_BLUE ? m_blue_scorers.size()
|
||||
: m_red_scorers.size());
|
||||
}
|
||||
// ------------------------------------------------------------------------
|
||||
const std::vector<ScorerData>& getScorers(SoccerTeam team) const
|
||||
|
||||
@@ -338,7 +338,7 @@ void RaceManager::startNew(bool from_overworld)
|
||||
->getUniqueID(),
|
||||
m_grand_prix.getId(),
|
||||
m_minor_mode,
|
||||
m_player_karts.size());
|
||||
(unsigned int)m_player_karts.size());
|
||||
|
||||
// Saved GP only in offline mode
|
||||
if (m_continue_saved_gp)
|
||||
@@ -394,7 +394,7 @@ void RaceManager::startNew(bool from_overworld)
|
||||
|
||||
// Then add the AI karts (randomly chosen)
|
||||
// ----------------------------------------
|
||||
const unsigned int ai_kart_count = m_ai_kart_list.size();
|
||||
const unsigned int ai_kart_count = (unsigned int)m_ai_kart_list.size();
|
||||
for(unsigned int i = 0; i < ai_kart_count; i++)
|
||||
{
|
||||
m_kart_status.push_back(KartStatus(m_ai_kart_list[i], i, -1, -1,
|
||||
@@ -445,7 +445,7 @@ void RaceManager::startNew(bool from_overworld)
|
||||
->getUniqueID(),
|
||||
m_grand_prix.getId(),
|
||||
m_minor_mode,
|
||||
m_player_karts.size());
|
||||
(unsigned int)m_player_karts.size());
|
||||
} // while m_saved_gp
|
||||
} // if m_continue_saved_gp
|
||||
} // if grand prix
|
||||
|
||||
@@ -200,7 +200,7 @@ bool ReplayPlay::addReplayFile(const std::string& fn, bool custom_replay)
|
||||
assert(m_replay_file_list.size() > 0);
|
||||
// Force to use custom replay file immediately
|
||||
if (custom_replay)
|
||||
m_current_replay_file = m_replay_file_list.size() - 1;
|
||||
m_current_replay_file = (unsigned int)m_replay_file_list.size() - 1;
|
||||
|
||||
return true;
|
||||
|
||||
|
||||
@@ -126,15 +126,16 @@ public:
|
||||
{ return m_replay_file_list.at(n); }
|
||||
// ------------------------------------------------------------------------
|
||||
const unsigned int getNumReplayFile() const
|
||||
{ return m_replay_file_list.size(); }
|
||||
{ return (unsigned int)m_replay_file_list.size(); }
|
||||
// ------------------------------------------------------------------------
|
||||
GhostKart* getGhostKart(int n) { return m_ghost_karts.get(n); }
|
||||
// ------------------------------------------------------------------------
|
||||
const unsigned int getNumGhostKart() const
|
||||
{
|
||||
assert(m_replay_file_list.size() > 0);
|
||||
return m_replay_file_list.at(m_current_replay_file).m_kart_list.size();
|
||||
}
|
||||
return (unsigned int)m_replay_file_list.at(m_current_replay_file)
|
||||
.m_kart_list.size();
|
||||
} // getNumGhostKart
|
||||
// ------------------------------------------------------------------------
|
||||
const std::string& getGhostKartName(int n) const
|
||||
{
|
||||
|
||||
@@ -146,7 +146,7 @@ public:
|
||||
return m_all_nodes[i];
|
||||
}
|
||||
// ------------------------------------------------------------------------
|
||||
unsigned int getNumNodes() const { return m_all_nodes.size(); }
|
||||
unsigned int getNumNodes() const { return (unsigned int)m_all_nodes.size(); }
|
||||
// ------------------------------------------------------------------------
|
||||
void findRoadSector(const Vec3& XYZ, int *sector,
|
||||
std::vector<int> *all_sectors = NULL,
|
||||
|
||||
Reference in New Issue
Block a user