mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Fix inefficient baseDir non-empty check
There's no need to call a string function and have function call overhead if you remember how C strings work: they have a null terminator. So if the first char in a string is a null terminator, then the string is completely empty. So you don't need to call that function.
This commit is contained in:
parent
7478b68dd7
commit
ce2eba1649
1 changed files with 1 additions and 1 deletions
|
@ -45,7 +45,7 @@ int FILESYSTEM_init(char *argvZero, char* baseDir, char *assetsPath)
|
|||
PHYSFS_permitSymbolicLinks(1);
|
||||
|
||||
/* Determine the OS user directory */
|
||||
if (baseDir && strlen(baseDir) > 0)
|
||||
if (baseDir && baseDir[0] != '\0')
|
||||
{
|
||||
strcpy(output, baseDir);
|
||||
|
||||
|
|
Loading…
Reference in a new issue