engine: common: simplify string operations

This commit is contained in:
Alibek Omarov 2022-12-04 05:24:35 +03:00
parent 6477f1656e
commit 51161004eb
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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 );