- fixes all fixable warnings because of implicit (const char *) to (char *)

conversions



git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1248 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
thebohemian 2007-09-19 11:03:40 +00:00
parent f4157b1d41
commit bf7cda5179
9 changed files with 17 additions and 17 deletions

View File

@ -49,7 +49,7 @@ int delete_fonts()
} // delete_fonts
// =============================================================================
Font::Font(char *fontname)
Font::Font(const char *fontname)
{
m_fnt = new fntTexFont(loader->getPath(fontname).c_str(),
GL_LINEAR, GL_LINEAR_MIPMAP_LINEAR);

View File

@ -35,7 +35,7 @@ public:
enum FontAlignType {ALIGN_LEFT, ALIGN_CENTER, ALIGN_BOTTOM};
const static int CENTER_OF_SCREEN=-1;
enum FontSize {SMALL=18, MEDIUM=24, LARGE=30 };
Font(char* fontname);
Font(const char* fontname);
Font(const std::string &fontname) { Font(fontname.c_str()); }
~Font();
void getBBox(const std::string &text, int size, bool italic,

View File

@ -27,9 +27,9 @@
#include <string>
char *sKartAction2String[KC_LAST+1] = {_("Left"), _("Right"), _("Accelerate"),
_("Brake"), _("Wheelie"), _("Jump"),
_("Rescue"), _("Fire"), _("Look back") };
const char *sKartAction2String[KC_LAST+1] = {_("Left"), _("Right"), _("Accelerate"),
_("Brake"), _("Wheelie"), _("Jump"),
_("Rescue"), _("Fire"), _("Look back") };
PlayerControls::PlayerControls(int whichPlayer): m_player_index(whichPlayer),

View File

@ -86,13 +86,13 @@ public:
int red=255, int green=0, int blue=255);
private:
ulClock m_fps_timer;
int m_fps_counter;
char m_fps_string[10];
double m_time_left ;
char* m_pos_string [11];
Material* m_steering_wheel_icon;
Material* m_speed_back_icon;
ulClock m_fps_timer;
int m_fps_counter;
char m_fps_string[10];
double m_time_left ;
const char* m_pos_string [11];
Material* m_steering_wheel_icon;
Material* m_speed_back_icon;
Material* m_speed_fore_icon;
typedef std::vector<TimedMessage> AllMessageType;
AllMessageType m_messages;

View File

@ -354,7 +354,7 @@ void HerringManager::loadHerringStyle(const std::string filename)
//-----------------------------------------------------------------------------
void HerringManager::setHerring(const lisp::Lisp *herring_node,
char *colour, herringType type)
const char *colour, herringType type)
{
std::string name;
herring_node->get(colour, name);

View File

@ -49,7 +49,7 @@ private:
std::string m_user_filename;
void CreateDefaultHerring(sgVec3 colour, std::string name);
void setDefaultHerringStyle();
void setHerring(const lisp::Lisp *herring_node, char *colour,
void setHerring(const lisp::Lisp *herring_node, const char *colour,
herringType type);
public:

View File

@ -44,7 +44,7 @@ Loader* loader = 0;
Loader::Loader()
{
char *datadir;
const char *datadir;
m_current_callback_type = CB_COLLECTABLE;
if ( getenv ( "SUPERTUXKART_DATADIR" ) != NULL )

View File

@ -50,7 +50,7 @@ enum KartActions { KC_LEFT,
KC_LOOK_BACK };
#define KC_LAST (KC_LOOK_BACK)
extern char *sKartAction2String[KC_LAST+1];
extern const char *sKartAction2String[KC_LAST+1];
/*class for managing player name and control configuration*/
class Player
{

View File

@ -1249,7 +1249,7 @@ void WidgetSet::dump(int id, int d)
if (id)
{
char *type = "?";
const char *type = "?";
switch (m_widgets[id].type & GUI_TYPE)
{