mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2025-01-01 13:45:40 +01:00
public: replace our Q_strlen with standard strlen with nullptr check in macro
This commit is contained in:
parent
07f1f7ded1
commit
3771a1d6c5
@ -60,23 +60,6 @@ qboolean Q_isdigit( const char *str )
|
||||
return false;
|
||||
}
|
||||
|
||||
size_t Q_strlen( const char *string )
|
||||
{
|
||||
size_t len;
|
||||
const char *p;
|
||||
|
||||
if( !string ) return 0;
|
||||
|
||||
len = 0;
|
||||
p = string;
|
||||
while( *p )
|
||||
{
|
||||
p++;
|
||||
len++;
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
size_t Q_colorstr( const char *string )
|
||||
{
|
||||
size_t len;
|
||||
|
@ -50,7 +50,7 @@ enum
|
||||
void Q_strnupr( const char *in, char *out, size_t size_out );
|
||||
#define Q_strlwr( in, out ) Q_strnlwr( in, out, 99999 )
|
||||
void Q_strnlwr( const char *in, char *out, size_t size_out );
|
||||
size_t Q_strlen( const char *string );
|
||||
#define Q_strlen( str ) (( str ) ? strlen(( str )) : 0 )
|
||||
size_t Q_colorstr( const char *string );
|
||||
char Q_toupper( const char in );
|
||||
char Q_tolower( const char in );
|
||||
|
Loading…
Reference in New Issue
Block a user