mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-09 05:41:46 +08:00
engine: fix some const qualifier lose and pointer-to-int casts
This commit is contained in:
@@ -510,7 +510,7 @@ void SV_WaterMove( edict_t *ent );
|
||||
// sv_send.c
|
||||
//
|
||||
void SV_SendClientMessages( void );
|
||||
void SV_ClientPrintf( sv_client_t *cl, char *fmt, ... ) _format( 2 );
|
||||
void SV_ClientPrintf( sv_client_t *cl, const char *fmt, ... ) _format( 2 );
|
||||
void SV_BroadcastCommand( const char *fmt, ... ) _format( 1 );
|
||||
|
||||
//
|
||||
@@ -532,7 +532,7 @@ void SV_ClientThink( sv_client_t *cl, usercmd_t *cmd );
|
||||
void SV_ExecuteClientMessage( sv_client_t *cl, sizebuf_t *msg );
|
||||
void SV_ConnectionlessPacket( netadr_t from, sizebuf_t *msg );
|
||||
edict_t *SV_FakeConnect( const char *netname );
|
||||
void SV_ExecuteClientCommand( sv_client_t *cl, char *s );
|
||||
void SV_ExecuteClientCommand( sv_client_t *cl, const char *s );
|
||||
void SV_RunCmd( sv_client_t *cl, usercmd_t *ucmd, int random_seed );
|
||||
void SV_BuildReconnect( sizebuf_t *msg );
|
||||
qboolean SV_IsPlayerIndex( int idx );
|
||||
@@ -540,7 +540,7 @@ int SV_CalcPing( sv_client_t *cl );
|
||||
void SV_InitClientMove( void );
|
||||
void SV_UpdateServerInfo( void );
|
||||
void SV_EndRedirect( void );
|
||||
void SV_RejectConnection( netadr_t from, char *fmt, ... ) _format( 2 );
|
||||
void SV_RejectConnection( netadr_t from, const char *fmt, ... ) _format( 2 );
|
||||
|
||||
//
|
||||
// sv_cmds.c
|
||||
|
||||
@@ -137,7 +137,7 @@ SV_RejectConnection
|
||||
Rejects connection request and sends back a message
|
||||
================
|
||||
*/
|
||||
void SV_RejectConnection( netadr_t from, char *fmt, ... )
|
||||
void SV_RejectConnection( netadr_t from, const char *fmt, ... )
|
||||
{
|
||||
char text[1024];
|
||||
va_list argptr;
|
||||
@@ -2118,7 +2118,7 @@ ucmd_t ucmds[] =
|
||||
SV_ExecuteUserCommand
|
||||
==================
|
||||
*/
|
||||
void SV_ExecuteClientCommand( sv_client_t *cl, char *s )
|
||||
void SV_ExecuteClientCommand( sv_client_t *cl, const char *s )
|
||||
{
|
||||
ucmd_t *u;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ SV_ClientPrintf
|
||||
Sends text across to be displayed if the level passes
|
||||
=================
|
||||
*/
|
||||
void SV_ClientPrintf( sv_client_t *cl, char *fmt, ... )
|
||||
void SV_ClientPrintf( sv_client_t *cl, const char *fmt, ... )
|
||||
{
|
||||
char string[MAX_SYSPATH];
|
||||
va_list argptr;
|
||||
@@ -48,7 +48,7 @@ SV_BroadcastPrintf
|
||||
Sends text to all active clients
|
||||
=================
|
||||
*/
|
||||
void SV_BroadcastPrintf( sv_client_t *ignore, char *fmt, ... )
|
||||
void SV_BroadcastPrintf( sv_client_t *ignore, const char *fmt, ... )
|
||||
{
|
||||
char string[MAX_SYSPATH];
|
||||
va_list argptr;
|
||||
|
||||
@@ -810,7 +810,7 @@ static char *StoreHashTable( SAVERESTOREDATA *pSaveData )
|
||||
{
|
||||
for( i = 0; i < pSaveData->tokenCount; i++ )
|
||||
{
|
||||
char *pszToken = pSaveData->pTokens[i] ? pSaveData->pTokens[i] : "";
|
||||
const char *pszToken = pSaveData->pTokens[i] ? pSaveData->pTokens[i] : "";
|
||||
|
||||
// just copy the token byte-by-byte
|
||||
while( *pszToken )
|
||||
|
||||
Reference in New Issue
Block a user