engine: fix some const qualifier lose and pointer-to-int casts

This commit is contained in:
Alibek Omarov
2021-07-20 16:03:06 +03:00
parent c3da9d8c8f
commit 0efc5e82ec
22 changed files with 43 additions and 40 deletions
+1 -1
View File
@@ -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;
+3 -4
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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 ));