warning fixes

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6444 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2011-05-16 13:15:57 +00:00
parent c8ae61fe8d
commit 6411ed3dc5
3 changed files with 7 additions and 7 deletions
+4 -4
View File
@@ -1273,7 +1273,7 @@ void flagmsg(int flag, int message, int actor, int flagtime)
void dropflag() { tryflagdrop(true); }
COMMAND(dropflag, ARG_NONE);
char *votestring(int type, char *arg1, char *arg2)
char *votestring(int type, const char *arg1, const char *arg2)
{
const char *msgs[] = { "kick player %s, reason: %s", "ban player %s, reason: %s", "remove all bans", "set mastermode to %s", "%s autoteam", "force player %s to the enemy team", "give admin to player %s", "load map %s in mode %s%s", "%s demo recording for the next match", "stop demo recording", "clear all demos", "set server description to '%s'", "shuffle teams"};
const char *msg = msgs[type];
@@ -1323,7 +1323,7 @@ char *votestring(int type, char *arg1, char *arg2)
return out;
}
votedisplayinfo *newvotedisplayinfo(playerent *owner, int type, char *arg1, char *arg2)
votedisplayinfo *newvotedisplayinfo(playerent *owner, int type, const char *arg1, const char *arg2)
{
if(type < 0 || type >= SA_NUM) return NULL;
votedisplayinfo *v = new votedisplayinfo();
@@ -1338,7 +1338,7 @@ votedisplayinfo *newvotedisplayinfo(playerent *owner, int type, char *arg1, char
votedisplayinfo *curvote = NULL, *calledvote = NULL;
void callvote(int type, char *arg1, char *arg2)
void callvote(int type, const char *arg1, const char *arg2)
{
if(calledvote) return;
votedisplayinfo *v = newvotedisplayinfo(player1, type, arg1, arg2);
@@ -1380,7 +1380,7 @@ void callvote(int type, char *arg1, char *arg2)
else conoutf(_("%c3invalid vote"), CC);
}
void scallvote(char *type, char *arg1, char *arg2)
void scallvote(char *type, const char *arg1, const char *arg2)
{
if(type && inmainloop)
{
+1 -1
View File
@@ -1271,7 +1271,7 @@ void parsemessages(int cn, playerent *d, ucharbuf &p)
string demofile;
extern char *curdemofile;
getstring(demofile, p, MAXSTRLEN);
watchingdemo = demoplayback = demofile && demofile[0];
watchingdemo = demoplayback = demofile[0] != '\0';
delete[] curdemofile;
if(demoplayback)
{
+2 -2
View File
@@ -388,7 +388,7 @@ extern playerent *newclient(int cn);
extern void timeupdate(int milliscur, int millismax); // was (int timeremain);
extern void respawnself();
extern void setskin(playerent *pl, int skin, int team = -1);
extern void callvote(int type, char *arg1 = NULL, char *arg2 = NULL);
extern void callvote(int type, const char *arg1 = NULL, const char *arg2 = NULL);
extern void addsleep(int msec, const char *cmd, bool persist = false);
extern void resetsleep(bool force = false);
//game mode extras
@@ -423,7 +423,7 @@ struct votedisplayinfo
votedisplayinfo() : owner(NULL), result(VOTE_NEUTRAL), millis(0), localplayervoted(false) { loopi(VOTE_NUM) stats[i] = VOTE_NEUTRAL; }
};
extern votedisplayinfo *newvotedisplayinfo(playerent *owner, int type, char *arg1, char *arg2);
extern votedisplayinfo *newvotedisplayinfo(playerent *owner, int type, const char *arg1, const char *arg2);
extern void callvotesuc();
extern void callvoteerr(int e);
extern void displayvote(votedisplayinfo *v);