mirror of
https://github.com/w23/xash3d-fwgs
synced 2024-12-15 13:41:33 +01:00
engine: common: simplify string operations
This commit is contained in:
parent
6477f1656e
commit
51161004eb
@ -1324,8 +1324,9 @@ static void Cmd_WriteHelp(const char *name, const char *unused, const char *desc
|
||||
{
|
||||
int length;
|
||||
|
||||
if( !desc || !Q_strcmp( desc, "" ))
|
||||
if( !COM_CheckString( desc ))
|
||||
return; // ignore fantom cmds
|
||||
|
||||
if( name[0] == '+' || name[0] == '-' )
|
||||
return; // key bindings
|
||||
|
||||
|
@ -409,7 +409,7 @@ convar_t *Cvar_Get( const char *name, const char *value, int flags, const char *
|
||||
// which executed from the config file. So we don't need to
|
||||
// change value here: we *already* have actual value from config.
|
||||
// in other cases we need to rewrite them
|
||||
if( Q_strcmp( var->desc, "" ))
|
||||
if( COM_CheckStringEmpty( var->desc ))
|
||||
{
|
||||
// directly set value
|
||||
freestring( var->string );
|
||||
|
Loading…
Reference in New Issue
Block a user