mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-02-06 12:14:15 +00: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;
|
int length;
|
||||||
|
|
||||||
if( !desc || !Q_strcmp( desc, "" ))
|
if( !COM_CheckString( desc ))
|
||||||
return; // ignore fantom cmds
|
return; // ignore fantom cmds
|
||||||
|
|
||||||
if( name[0] == '+' || name[0] == '-' )
|
if( name[0] == '+' || name[0] == '-' )
|
||||||
return; // key bindings
|
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
|
// which executed from the config file. So we don't need to
|
||||||
// change value here: we *already* have actual value from config.
|
// change value here: we *already* have actual value from config.
|
||||||
// in other cases we need to rewrite them
|
// in other cases we need to rewrite them
|
||||||
if( Q_strcmp( var->desc, "" ))
|
if( COM_CheckStringEmpty( var->desc ))
|
||||||
{
|
{
|
||||||
// directly set value
|
// directly set value
|
||||||
freestring( var->string );
|
freestring( var->string );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user