Fixed several compiler warnings for Visual Studio.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1340 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2007-12-11 02:48:10 +00:00
parent a71c09f62f
commit b3ab2d474d
6 changed files with 16 additions and 9 deletions

View File

@ -129,7 +129,7 @@ BaseGUI::update(float dt)
//-----------------------------------------------------------------------------
void
BaseGUI::TimeToString(const float TIME, char *s)
BaseGUI::TimeToString(const double TIME, char *s)
{
int min = (int) floor ( TIME / 60.0 ) ;
int sec = (int) floor ( TIME - (double) ( 60 * min ) ) ;

View File

@ -41,7 +41,7 @@ public:
void inputPointer(int x, int y);
void TimeToString(const float time, char *s);
void TimeToString(const double time, char *s);
protected:
int m_menu_id;

View File

@ -124,7 +124,7 @@ void MenuManager::update()
delete m_current_menu;
m_current_menu= NULL;
m_handled_size= m_menu_stack.size();
m_handled_size= (unsigned int)m_menu_stack.size();
if (m_handled_size > 0)
{
pair<MenuManagerIDs, int> saved = m_menu_stack.back();
@ -213,7 +213,7 @@ void MenuManager::update()
} // switch
if( !widget_manager->is_empty() )
if( id != MENUID_EXITGAME )
{
// Restores the previously selected widget if there was one.
if (saved_widget != WidgetManager::WGT_NONE)
@ -236,7 +236,7 @@ void MenuManager::update()
if (m_current_menu != NULL)
{
m_current_menu->update(now.getDeltaTime());
m_current_menu->update((float)now.getDeltaTime());
}
} // update

View File

@ -122,7 +122,14 @@ void KartParticleSystem::particle_delete (int , Particle* )
//=============================================================================
Kart::Kart (const KartProperties* kartProperties_, int position_ ,
sgCoord init_pos)
#if defined(WIN32) && !defined(__CYGWIN__)
// Disable warning for using 'this' in base member initializer list
# pragma warning(disable:4355)
#endif
: Moveable(true), m_attachment(this), m_collectable(this)
#if defined(WIN32) && !defined(__CYGWIN__)
# pragma warning(1:4355)
#endif
{
m_kart_properties = kartProperties_;
m_grid_position = position_ ;

View File

@ -73,7 +73,7 @@ public:
int getIndex () { return m_index ; }
void apply () { m_state -> apply () ; }
char *getTexFname () { return m_texname ; }
char *getTexFname () const { return m_texname ; }
} ;

View File

@ -190,7 +190,7 @@ void DefaultRobot::handle_braking()
//-----------------------------------------------------------------------------
void DefaultRobot::handle_steering()
{
const unsigned int DRIVELINE_SIZE = world->m_track->m_driveline.size();
const unsigned int DRIVELINE_SIZE = (unsigned int)world->m_track->m_driveline.size();
const size_t NEXT_SECTOR = (unsigned int)m_track_sector + 1 < DRIVELINE_SIZE ?
m_track_sector + 1 : 0;
float steer_angle = 0.0f;
@ -633,7 +633,7 @@ void DefaultRobot::check_crashes( const int STEPS, sgVec3 const pos )
*/
void DefaultRobot::find_non_crashing_point( sgVec2 result )
{
const unsigned int DRIVELINE_SIZE = world->m_track->m_driveline.size();
const unsigned int DRIVELINE_SIZE = (unsigned int)world->m_track->m_driveline.size();
unsigned int sector = (unsigned int)m_track_sector + 1 < DRIVELINE_SIZE ?
m_track_sector + 1 : 0;
@ -864,7 +864,7 @@ float DefaultRobot::get_approx_radius(const int START, const int END) const
*/
void DefaultRobot::find_curve()
{
const int DRIVELINE_SIZE = world->m_track->m_driveline.size();
const int DRIVELINE_SIZE = (unsigned int)world->m_track->m_driveline.size();
float total_dist = 0.0f;
int next_hint = m_track_sector;
int i;