mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-11-24 06:19:25 +03: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:
1 parent
7478b68dd7
commit
ce2eba1649
1 file changed
+1
-1
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user