Fixed various compiler warnings.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12542 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2013-03-06 23:12:24 +00:00
parent 502042432c
commit 62ea0bbbe0
16 changed files with 21 additions and 26 deletions

View File

@ -161,14 +161,6 @@ CutsceneWorld::~CutsceneWorld()
{
} // ~CutsceneWorld
//-----------------------------------------------------------------------------
/** Called when a kart is hit.
* \param kart_id The world kart id of the kart that was hit.
*/
void CutsceneWorld::kartHit(const int kart_id)
{
}
//-----------------------------------------------------------------------------
/** Returns the internal identifier for this race.
*/

View File

@ -85,7 +85,6 @@ public:
virtual const std::string& getIdent() const OVERRIDE;
virtual void kartHit(const int kart_id) OVERRIDE;
virtual void update(float dt) OVERRIDE;
virtual void createRaceGUI() OVERRIDE;

View File

@ -124,10 +124,9 @@ void ThreeStrikesBattle::kartAdded(AbstractKart* kart, scene::ISceneNode* node)
/** Called when a kart is hit.
* \param kart_id The world kart id of the kart that was hit.
*/
void ThreeStrikesBattle::kartHit(const int kart_id)
void ThreeStrikesBattle::kartHit(const unsigned int kart_id)
{
assert(kart_id >= 0);
assert(kart_id < (int)m_karts.size());
assert(kart_id < m_karts.size());
// make kart lose a life
m_kart_info[kart_id].m_lives--;

View File

@ -101,7 +101,7 @@ public:
virtual const std::string& getIdent() const;
virtual void kartHit(const int kart_id);
virtual void kartHit(const unsigned int kart_id);
virtual void update(float dt);
virtual void kartAdded(AbstractKart* kart, scene::ISceneNode* node);

View File

@ -242,7 +242,7 @@ public:
virtual void newLap(unsigned int kart_index) {}
// ------------------------------------------------------------------------
/** Called when a kart was hit by a projectile. */
virtual void kartHit(const int kart_id) {};
virtual void kartHit(const unsigned int kart_id) {};
// ------------------------------------------------------------------------
virtual void onMouseClick(int x, int y) {};

View File

@ -82,7 +82,7 @@ void AmbientLightSphere::update(float dt)
* additional data.
*/
bool AmbientLightSphere::isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
int indx)
unsigned int indx)
{
for(unsigned int i=0; i<Camera::getNumCameras(); i++)
{

View File

@ -53,7 +53,7 @@ public:
virtual ~AmbientLightSphere() {};
virtual void update(float dt);
virtual bool isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
int indx);
unsigned int indx);
}; // AmbientLightSphere
#endif

View File

@ -59,7 +59,7 @@ void CheckGoal::update(float dt)
assert(tom);
PtrVector<TrackObject>& objects = tom->getObjects();
int ball_index = 0;
unsigned int ball_index = 0;
for(int i=0; i<objects.size(); i++)
{
TrackObject* obj = objects.get(i);
@ -96,7 +96,8 @@ void CheckGoal::trigger(unsigned int kart_index)
world->onCheckGoalTriggered(m_first_goal);
} // CheckGoal
bool CheckGoal::isTriggered(const Vec3 &old_pos, const Vec3 &new_pos, int indx)
bool CheckGoal::isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
unsigned int indx)
{
core::vector2df cross_point;

View File

@ -48,7 +48,8 @@ public:
virtual ~CheckGoal() {}
virtual void update(float dt) OVERRIDE;
virtual void trigger(unsigned int kart_index);
virtual bool isTriggered(const Vec3 &old_pos, const Vec3 &new_pos, int indx) OVERRIDE;
virtual bool isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
unsigned int indx) OVERRIDE;
virtual void reset(const Track &track) OVERRIDE;
}; // CheckLine

View File

@ -57,7 +57,8 @@ void CheckLap::reset(const Track &track)
* \param indx Index of the kart, can be used to store kart specific
* additional data.
*/
bool CheckLap::isTriggered(const Vec3 &old_pos, const Vec3 &new_pos, int indx)
bool CheckLap::isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
unsigned int indx)
{
float track_length = World::getWorld()->getTrack()->getTrackLength();
LinearWorld *lin_world = dynamic_cast<LinearWorld*>(World::getWorld());

View File

@ -40,7 +40,7 @@ public:
CheckLap(const XMLNode &node, unsigned int index);
virtual ~CheckLap() {};
virtual bool isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
int indx);
unsigned int indx);
virtual void reset(const Track &track);
}; // CheckLine

View File

@ -149,7 +149,8 @@ void CheckLine::changeDebugColor(bool is_active)
* \param indx Index of the kart, can be used to store kart specific
* additional data.
*/
bool CheckLine::isTriggered(const Vec3 &old_pos, const Vec3 &new_pos, int indx)
bool CheckLine::isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
unsigned int indx)
{
core::vector2df p=new_pos.toIrrVector2d();
bool sign = m_line.getPointOrientation(p)>=0;

View File

@ -75,7 +75,7 @@ public:
CheckLine(const XMLNode &node, unsigned int index);
virtual ~CheckLine();
virtual bool isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
int indx);
unsigned int indx);
virtual void reset(const Track &track);
virtual void changeDebugColor(bool is_active);
/** Returns the actual line data for this checkpoint. */

View File

@ -56,7 +56,8 @@ CheckSphere::CheckSphere(const XMLNode &node, unsigned int index)
* \param kart_id Index of the kart, can be used to store kart specific
* additional data.
*/
bool CheckSphere::isTriggered(const Vec3 &old_pos, const Vec3 &new_pos, int kart_id)
bool CheckSphere::isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
unsigned int kart_id)
{
float old_dist2 = (old_pos-m_center_point).length2();
float new_dist2 = (new_pos-m_center_point).length2();

View File

@ -48,7 +48,7 @@ public:
CheckSphere(const XMLNode &node, unsigned int index);
virtual ~CheckSphere() {};
virtual bool isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
int kart_id);
unsigned int kart_id);
// ------------------------------------------------------------------------
/** Returns if kart indx is currently inside of the sphere. */
bool isInside(int index) const { return m_is_inside[index]; }

View File

@ -114,7 +114,7 @@ public:
* additional data.
*/
virtual bool isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
int indx)=0;
unsigned int indx)=0;
virtual void trigger(unsigned int kart_index);
virtual void reset(const Track &track);