mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +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:
@@ -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