File armagetronad-0.2.8.2.1-string_const.patch of Package armagetron

--- src/engine/ePlayer.cpp
+++ src/engine/ePlayer.cpp
@@ -497,7 +497,7 @@
 
 
 
-static char *default_instant_chat[]=
+static char const *default_instant_chat[]=
     {"/team \\",
      "/msg \\",
      "/me \\",
--- src/engine/eTeam.cpp
+++ src/engine/eTeam.cpp
@@ -45,18 +45,17 @@
       {  7,  7,  7 }   // black
     };
 
-static char* se_team_name[TEAMCOLORS]=
-    {
-        "$team_name_blue",
-        "$team_name_gold",
-        "$team_name_red",
-        "$team_name_green",
-        "$team_name_violet",
-        "$team_name_ugly",
-        "$team_name_white",
-        "$team_name_black"
-    };
-
+static tString se_team_name[TEAMCOLORS]=
+{
+    tString("$team_name_blue"),
+    tString("$team_name_gold"),
+    tString("$team_name_red"),
+    tString("$team_name_green"),
+    tString("$team_name_violet"),
+    tString("$team_name_ugly"),
+    tString("$team_name_white"),
+    tString("$team_name_black")
+};
 
 //! Creates a color string inserter
 inline static tColoredStringProxy ColorString( const eTeam * t )
--- src/render/rTexture.cpp
+++ src/render/rTexture.cpp
@@ -765,7 +765,7 @@
 
 int rTextureGroups::TextureMode[rTextureGroups::TEX_GROUPS];
 
-char *rTextureGroups::TextureGroupDescription[rTextureGroups::TEX_GROUPS]=
+char const *rTextureGroups::TextureGroupDescription[rTextureGroups::TEX_GROUPS]=
     {
         "$texture_mode_0_help",
         "$texture_mode_1_help",
--- src/render/rTexture.h
+++ src/render/rTexture.h
@@ -49,7 +49,7 @@
     };
 
     static int TextureMode[TEX_GROUPS];                 //!< the OpenGL texture modes for the groubs
-    static char *TextureGroupDescription[TEX_GROUPS];   //!< descriptions for the groups
+    static char const *TextureGroupDescription[TEX_GROUPS];   //!< descriptions for the groups
 };
 
 //! wrapper for SDL surface
--- src/render/rViewport.cpp
+++ src/render/rViewport.cpp
@@ -163,7 +163,7 @@
 rViewportConfiguration *rViewportConfiguration::s_viewportConfigurations[]={
             &single_vp,&two_vp,&two_b,&three_a,&three_b,&four_vp};
 
-char *rViewportConfiguration::s_viewportConfigurationNames[]=
+char const *rViewportConfiguration::s_viewportConfigurationNames[]=
     {"$viewport_conf_name_0",
      "$viewport_conf_name_1",
      "$viewport_conf_name_2",
--- src/render/rViewport.h
+++ src/render/rViewport.h
@@ -93,7 +93,7 @@
 
     static rViewportConfiguration *s_viewportConfigurations[];
     static const int               s_viewportNumConfigurations;
-    static char                   *s_viewportConfigurationNames[];
+    static char const             *s_viewportConfigurationNames[];
 
     static rViewportConfiguration *CurrentViewportConfiguration();
 
--- src/tools/tCommandLine.cpp
+++ src/tools/tCommandLine.cpp
@@ -219,7 +219,7 @@
 //!
 // *******************************************************************************************
 
-bool tCommandLineParser::GetSwitch( char const * option, char * option_short )
+bool tCommandLineParser::GetSwitch( char const * option, char const * option_short )
 {
     if ( End() )
         return false;
--- src/tools/tCommandLine.h
+++ src/tools/tCommandLine.h
@@ -62,7 +62,7 @@
 struct tCommandLineParser
 {
 public:
-    bool GetSwitch( char const * option, char * option_short=NULL );                      //! Tests whether the current argument is the given switch
+    bool GetSwitch( char const * option, char const * option_short=NULL );                //! Tests whether the current argument is the given switch
     bool GetOption( tString & target, char const * option, char * option_short=NULL );    //! Tests whether the current argument is the given option and extracts the value
 
     bool End() const;                                                                     //! Tests whether the command line parsing is done
--- src/tools/tError.h
+++ src/tools/tError.h
@@ -41,7 +41,7 @@
 #include <unistd.h>
 #endif
 
-#define tVERIFY( x ) { if ( !( x ) ){ char* mess = "Assertion " #x " failed";  tERR_ERROR_INT( mess ); } }
+#define tVERIFY( x ) { if ( !( x ) ){ char const * mess = "Assertion " #x " failed";  tERR_ERROR_INT( mess ); } }
 
 #ifdef DEBUG
 
--- src/tron/gGame.cpp
+++ src/tron/gGame.cpp
@@ -119,7 +119,7 @@
 static nSettingItemWatched<tString> conf_mapfile("MAP_FILE",mapfile, nConfItemVersionWatcher::Group_Breaking, 8 );
 
 // bool globalingame=false;
-tString sg_GetCurrentTime( char *szFormat )
+tString sg_GetCurrentTime( char const *szFormat )
 {
     char szTemp[128];
     time_t     now;
@@ -130,7 +130,7 @@
     return tString(szTemp);
 }
 
-void sg_PrintCurrentTime( char *szFormat )
+void sg_PrintCurrentTime( char const *szFormat )
 {
     con << sg_GetCurrentTime(szFormat);
 }
@@ -615,7 +615,7 @@
 protected:
     tArray<tString> highName;
 
-    char*   highscore_file;
+    char const * highscore_file;
     tOutput desc;
     int     maxSize;
 
@@ -728,7 +728,7 @@
         return found;
     }
 
-    gHighscoresBase(char *name,char *sd,int max=0)
+    gHighscoresBase(char const *name,char const *sd,int max=0)
             :id(-1),highscore_file(name),desc(sd),maxSize(max){
         highscoreList.Add(this,id);
     }
@@ -935,7 +935,7 @@
         }
     }
 
-    highscores(char *name,char *sd,int max=0)
+    highscores(char const *name,char const *sd,int max=0)
             :gHighscoresBase(name,sd,max){
         //		Load();
     }
@@ -1145,7 +1145,7 @@
         }
     }
 
-    ladder(char *name,char *sd,int max=0)
+    ladder(char const *name,char const *sd,int max=0)
             :highscores<REAL>(name,sd,max){
         //		Load();
     }
@@ -2323,7 +2323,7 @@
     if (ingame)
         sg_IngameMenu = &MainMenu;
 
-    char *extitle,*exhelp;
+    char const *extitle,*exhelp;
     if (!ingame){
         extitle="$main_menu_exit_text";
         exhelp="$main_menu_exit_help";
@@ -2439,7 +2439,7 @@
     uMenuItemSubmenu *gamemenuitem = NULL;
     if (sn_GetNetState() != nCLIENT)
     {
-        char *gamehelp;
+        char const *gamehelp;
         if (!ingame)
             gamehelp="$game_menu_main_help";
         else
--- src/tron/gMenus.cpp
+++ src/tron/gMenus.cpp
@@ -90,7 +90,7 @@
     void NewChoice(uSelectItem<bool> *){};
     void NewChoice(char *,bool ){};
 public:
-    ArmageTron_feature_menuitem(uMenu *m,char *tit,const char *help,int &targ)
+    ArmageTron_feature_menuitem(uMenu *m,char const *tit,char const *help,int &targ)
             :uMenuItemSelection<int>(m,tit,help,targ){
         uMenuItemSelection<int>::NewChoice(
             "$feature_disabled_text",
@@ -114,7 +114,7 @@
     void NewChoice(uSelectItem<bool> *){};
     void NewChoice(char *,bool ){};
 public:
-    ArmageTron_texmode_menuitem(uMenu *m,char *tit,int &targ,
+    ArmageTron_texmode_menuitem(uMenu *m,char const *tit,int &targ,
                                 bool font=false)
             :uMenuItemSelection<int>
     (m,tit,"$texture_menuitem_help",targ){
--- src/ui/uInput.cpp
+++ src/ui/uInput.cpp
@@ -344,7 +344,7 @@
 //  Menuitem for input selection
 // *****************************************************
 
-static char *keyname(int sym){
+static char const *keyname(int sym){
 #ifndef DEDICATED
     if (sym<=SDLK_LAST)
         return SDL_GetKeyName(static_cast<SDLKey>(sym));
@@ -716,7 +716,7 @@
 // Player binds
 // *****************
 
-static char *Player_keyword="PLAYER_BIND";
+static char const *Player_keyword="PLAYER_BIND";
 
 uBindPlayer::uBindPlayer(uAction *a,int p):uBind(a),ePlayer(p){}
 
openSUSE Build Service is sponsored by