mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
public: make COM_FixSlashes inlined
This commit is contained in:
@@ -663,21 +663,6 @@ void COM_RemoveLineFeed( char *str, size_t bufsize )
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
============
|
||||
COM_FixSlashes
|
||||
|
||||
Changes all '\' characters into '/' characters, in place.
|
||||
============
|
||||
*/
|
||||
void COM_FixSlashes( char *pname )
|
||||
{
|
||||
while(( pname = Q_strchr( pname, '\\' )))
|
||||
{
|
||||
*pname = '/';
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
============
|
||||
COM_PathSlashFix
|
||||
|
||||
@@ -96,7 +96,6 @@ void COM_ExtractFilePath( const char *path, char *dest );
|
||||
const char *COM_FileWithoutPath( const char *in );
|
||||
void COM_StripExtension( char *path );
|
||||
void COM_RemoveLineFeed( char *str, size_t bufsize );
|
||||
void COM_FixSlashes( char *pname );
|
||||
void COM_PathSlashFix( char *path );
|
||||
// return 0 on empty or null string, 1 otherwise
|
||||
#define COM_CheckString( string ) ( ( !string || !*string ) ? 0 : 1 )
|
||||
@@ -320,6 +319,19 @@ static inline int Q_splitstr( char *str, int delim, void *userdata,
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
============
|
||||
COM_FixSlashes
|
||||
|
||||
Changes all '\' characters into '/' characters, in place.
|
||||
============
|
||||
*/
|
||||
static inline void COM_FixSlashes( char *pname )
|
||||
{
|
||||
while(( pname = Q_strchr( pname, '\\' )))
|
||||
*pname = '/';
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user