mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-22 12:54:13 +00:00
engine: various const qualifier fixes
This commit is contained in:
parent
5fb4edeb36
commit
6f36edfd16
@ -145,7 +145,7 @@ typedef struct dll_info_s
|
||||
void *link; // hinstance of loading library
|
||||
} dll_info_t;
|
||||
|
||||
typedef void (*setpair_t)( const char *key, const void *value, void *buffer, void *numpairs );
|
||||
typedef void (*setpair_t)( const char *key, const void *value, const void *buffer, void *numpairs );
|
||||
|
||||
// config strings are a general means of communication from
|
||||
// the server to all connected clients.
|
||||
|
@ -21,7 +21,7 @@ GNU General Public License for more details.
|
||||
|
||||
static int cszrawsentences = 0;
|
||||
static char *rgpszrawsentence[CVOXFILESENTENCEMAX];
|
||||
static char *voxperiod = "_period", *voxcomma = "_comma";
|
||||
static const char *voxperiod = "_period", *voxcomma = "_comma";
|
||||
|
||||
// return number of samples mixed
|
||||
int VOX_MixDataToDevice( channel_t *pchan, int sampleCount, int outputRate, int outputOffset )
|
||||
@ -248,8 +248,8 @@ static int VOX_ParseString( char *psz, char *rgpparseword[CVOXWORDMAX] )
|
||||
psz[1] != '\n' && psz[1] != '\r' && psz[1] != '\0' )
|
||||
{
|
||||
if( *psz == '.' )
|
||||
rgpparseword[i++] = voxperiod;
|
||||
else rgpparseword[i++] = voxcomma;
|
||||
rgpparseword[i++] = (char *)voxperiod;
|
||||
else rgpparseword[i++] = (char *)voxcomma;
|
||||
|
||||
if( i >= CVOXWORDMAX )
|
||||
return i;
|
||||
@ -457,7 +457,7 @@ static void VOX_ReadSentenceFile_( byte *buf, fs_offset_t size )
|
||||
}
|
||||
}
|
||||
|
||||
static void VOX_ReadSentenceFile( char *path )
|
||||
static void VOX_ReadSentenceFile( const char *path )
|
||||
{
|
||||
byte *buf;
|
||||
fs_offset_t size;
|
||||
@ -529,11 +529,11 @@ static void Test_VOX_LookupString( void )
|
||||
|
||||
VOX_Shutdown();
|
||||
|
||||
rgpszrawsentence[cszrawsentences++] = "exactmatch\000123";
|
||||
rgpszrawsentence[cszrawsentences++] = "CaseInsensitive\000456";
|
||||
rgpszrawsentence[cszrawsentences++] = "SentenceWithTabs\0\t\t\t789";
|
||||
rgpszrawsentence[cszrawsentences++] = "SentenceWithSpaces\0 SPAAACE";
|
||||
rgpszrawsentence[cszrawsentences++] = "SentenceWithTabsAndSpaces\0\t \t\t MEOW";
|
||||
rgpszrawsentence[cszrawsentences++] = (char*)"exactmatch\000123";
|
||||
rgpszrawsentence[cszrawsentences++] = (char*)"CaseInsensitive\000456";
|
||||
rgpszrawsentence[cszrawsentences++] = (char*)"SentenceWithTabs\0\t\t\t789";
|
||||
rgpszrawsentence[cszrawsentences++] = (char*)"SentenceWithSpaces\0 SPAAACE";
|
||||
rgpszrawsentence[cszrawsentences++] = (char*)"SentenceWithTabsAndSpaces\0\t \t\t MEOW";
|
||||
|
||||
for( i = 0; i < sizeof( data ) / sizeof( data[0] ); i += 2 )
|
||||
{
|
||||
|
@ -229,7 +229,7 @@ void BaseCmd_Stats_f( void )
|
||||
Con_Printf( "Empty buckets: %d\n", empty );
|
||||
}
|
||||
|
||||
static void BaseCmd_CheckCvars( const char *key, const char *value, void *buffer, void *ptr )
|
||||
static void BaseCmd_CheckCvars( const char *key, const char *value, const void *unused, void *ptr )
|
||||
{
|
||||
base_command_t *v = BaseCmd_Find( HM_CVAR, key );
|
||||
qboolean *invalid = ptr;
|
||||
|
@ -3842,7 +3842,7 @@ char *pfnGetInfoKeyBuffer( edict_t *e )
|
||||
if(( cl = SV_ClientFromEdict( e, false )) != NULL )
|
||||
return cl->userinfo;
|
||||
|
||||
return ""; // assume error
|
||||
return (char*)""; // assume error
|
||||
}
|
||||
|
||||
/*
|
||||
@ -4807,7 +4807,7 @@ qboolean SV_ParseEdict( char **pfile, edict_t *ent )
|
||||
if( !token[0] ) continue;
|
||||
|
||||
// create keyvalue strings
|
||||
pkvd[numpairs].szClassName = ""; // unknown at this moment
|
||||
pkvd[numpairs].szClassName = (char*)""; // unknown at this moment
|
||||
pkvd[numpairs].szKeyName = copystring( keyname );
|
||||
pkvd[numpairs].szValue = copystring( token );
|
||||
pkvd[numpairs].fHandled = false;
|
||||
@ -4845,8 +4845,8 @@ qboolean SV_ParseEdict( char **pfile, edict_t *ent )
|
||||
{
|
||||
if( numpairs < 256 )
|
||||
{
|
||||
pkvd[numpairs].szClassName = "custom";
|
||||
pkvd[numpairs].szKeyName = "customclass";
|
||||
pkvd[numpairs].szClassName = (char*)"custom";
|
||||
pkvd[numpairs].szKeyName = (char*)"customclass";
|
||||
pkvd[numpairs].szValue = classname;
|
||||
pkvd[numpairs].fHandled = false;
|
||||
numpairs++;
|
||||
|
@ -136,7 +136,7 @@ void Log_Printf( const char *fmt, ... )
|
||||
}
|
||||
}
|
||||
|
||||
static void Log_PrintServerCvar( const char *var_name, const char *var_value, void *unused2, void *unused3 )
|
||||
static void Log_PrintServerCvar( const char *var_name, const char *var_value, const void *unused2, void *unused3 )
|
||||
{
|
||||
Log_Printf( "Server cvar \"%s\" = \"%s\"\n", var_name, var_value );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user