Fixed net server C++11 warning: dynamic exception specifications are deprecated in C++11, which results in a compiler error when using C++17 standard. (#300)
This commit is contained in:
parent
8e6e40848d
commit
f4183a6495
|
@ -107,7 +107,7 @@ typedef struct
|
||||||
|
|
||||||
CONFIG ServerConfig;
|
CONFIG ServerConfig;
|
||||||
|
|
||||||
int LoadConfigFile(char *fn)
|
int LoadConfigFile(const char *fn)
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
ServerConfig.Port = ServerConfig.MaxClients = ServerConfig.ConnectTimeout = ServerConfig.FrameDivisor = ~0;
|
ServerConfig.Port = ServerConfig.MaxClients = ServerConfig.ConnectTimeout = ServerConfig.FrameDivisor = ~0;
|
||||||
|
@ -174,10 +174,10 @@ static uint32 de32(uint8 *morp)
|
||||||
|
|
||||||
static char *CleanNick(char *nick);
|
static char *CleanNick(char *nick);
|
||||||
static int NickUnique(ClientEntry *client);
|
static int NickUnique(ClientEntry *client);
|
||||||
static void AddClientToGame(ClientEntry *client, uint8 id[16], uint8 extra[64]) throw(int);
|
static void AddClientToGame(ClientEntry *client, uint8 id[16], uint8 extra[64]) throw();
|
||||||
static void SendToAll(GameEntry *game, int cmd, uint8 *data, uint32 len) throw(int);
|
static void SendToAll(GameEntry *game, int cmd, uint8 *data, uint32 len) throw();
|
||||||
static void BroadcastText(GameEntry *game, const char *fmt, ...) throw(int);
|
static void BroadcastText(GameEntry *game, const char *fmt, ...) throw();
|
||||||
static void TextToClient(ClientEntry *client, const char *fmt, ...) throw(int);
|
static void TextToClient(ClientEntry *client, const char *fmt, ...) throw();
|
||||||
static void KillClient(ClientEntry *client);
|
static void KillClient(ClientEntry *client);
|
||||||
|
|
||||||
#define NBTCP_LOGINLEN 0x100
|
#define NBTCP_LOGINLEN 0x100
|
||||||
|
@ -233,7 +233,7 @@ static uint8 *MakeMPS(ClientEntry *client)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Returns 1 if we are back to normal game mode, 0 if more data is yet to arrive. */
|
/* Returns 1 if we are back to normal game mode, 0 if more data is yet to arrive. */
|
||||||
static int CheckNBTCPReceive(ClientEntry *client) throw(int)
|
static int CheckNBTCPReceive(ClientEntry *client) throw()
|
||||||
{
|
{
|
||||||
if(!client->nbtcplen)
|
if(!client->nbtcplen)
|
||||||
throw(1); /* Should not happen. */
|
throw(1); /* Should not happen. */
|
||||||
|
@ -469,7 +469,7 @@ static int NickUnique(ClientEntry *client)
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int MakeSendTCP(ClientEntry *client, uint8 *data, uint32 len) throw(int)
|
static int MakeSendTCP(ClientEntry *client, uint8 *data, uint32 len) throw()
|
||||||
{
|
{
|
||||||
if(send(client->TCPSocket, data, len, MSG_NOSIGNAL) != len)
|
if(send(client->TCPSocket, data, len, MSG_NOSIGNAL) != len)
|
||||||
throw(1);
|
throw(1);
|
||||||
|
@ -477,7 +477,7 @@ static int MakeSendTCP(ClientEntry *client, uint8 *data, uint32 len) throw(int)
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SendToAll(GameEntry *game, int cmd, uint8 *data, uint32 len) throw(int)
|
static void SendToAll(GameEntry *game, int cmd, uint8 *data, uint32 len) throw()
|
||||||
{
|
{
|
||||||
uint8 poo[5];
|
uint8 poo[5];
|
||||||
int x;
|
int x;
|
||||||
|
@ -506,7 +506,7 @@ static void SendToAll(GameEntry *game, int cmd, uint8 *data, uint32 len) throw(i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void TextToClient(ClientEntry *client, const char *fmt, ...) throw(int)
|
static void TextToClient(ClientEntry *client, const char *fmt, ...) throw()
|
||||||
{
|
{
|
||||||
char *moo;
|
char *moo;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
@ -528,7 +528,7 @@ static void TextToClient(ClientEntry *client, const char *fmt, ...) throw(int)
|
||||||
free(moo);
|
free(moo);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void BroadcastText(GameEntry *game, const char *fmt, ...) throw(int)
|
static void BroadcastText(GameEntry *game, const char *fmt, ...) throw()
|
||||||
{
|
{
|
||||||
char *moo;
|
char *moo;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
@ -595,7 +595,7 @@ static void KillClient(ClientEntry *client)
|
||||||
BroadcastText(game,"%s",bmsg);
|
BroadcastText(game,"%s",bmsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void AddClientToGame(ClientEntry *client, uint8 id[16], uint8 extra[64]) throw(int)
|
static void AddClientToGame(ClientEntry *client, uint8 id[16], uint8 extra[64]) throw()
|
||||||
{
|
{
|
||||||
int wg;
|
int wg;
|
||||||
GameEntry *game,*fegame;
|
GameEntry *game,*fegame;
|
||||||
|
|
Loading…
Reference in New Issue