mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-10 14:12:04 +08:00
engine: fix some const qualifier lose and pointer-to-int casts
This commit is contained in:
@@ -2535,7 +2535,7 @@ CL_ServerCommand
|
||||
send command to a server
|
||||
====================
|
||||
*/
|
||||
void CL_ServerCommand( qboolean reliable, char *fmt, ... )
|
||||
void CL_ServerCommand( qboolean reliable, const char *fmt, ... )
|
||||
{
|
||||
char string[MAX_SYSPATH];
|
||||
va_list argptr;
|
||||
|
||||
@@ -990,13 +990,12 @@ void GAME_EXPORT Con_DrawStringLen( const char *pText, int *length, int *height
|
||||
{
|
||||
int curLength = 0;
|
||||
|
||||
if( !con.curFont ) return;
|
||||
|
||||
if( height ) *height = con.curFont->charHeight;
|
||||
if( !length ) return;
|
||||
|
||||
*length = 0;
|
||||
|
||||
if( !con.curFont ) return;
|
||||
if( height ) *height = con.curFont->charHeight;
|
||||
|
||||
while( *pText )
|
||||
{
|
||||
byte c = *pText;
|
||||
|
||||
@@ -29,7 +29,7 @@ typedef struct
|
||||
|
||||
typedef struct keyname_s
|
||||
{
|
||||
char *name; // key name
|
||||
const char *name; // key name
|
||||
int keynum; // key number
|
||||
const char *binding; // default bind
|
||||
} keyname_t;
|
||||
|
||||
@@ -1773,7 +1773,7 @@ void S_Music_f( void )
|
||||
else if( c == 2 )
|
||||
{
|
||||
string intro, main, track;
|
||||
char *ext[] = { "mp3", "wav" };
|
||||
const char *ext[] = { "mp3", "wav" };
|
||||
int i;
|
||||
|
||||
Q_strncpy( track, Cmd_Argv( 1 ), sizeof( track ));
|
||||
|
||||
Reference in New Issue
Block a user