mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-01 10:32:35 +01:00
Networking (Windows): apply the same optimizations of *nix's
This commit is contained in:
+5
-7
@@ -2,13 +2,11 @@
|
||||
|
||||
static inline const char* ffFindFileName(const char* file)
|
||||
{
|
||||
const char* lastSlash = __builtin_strrchr(file,
|
||||
#ifdef _WIN32
|
||||
'\\'
|
||||
#else
|
||||
'/'
|
||||
#endif
|
||||
);
|
||||
const char* lastSlash = __builtin_strrchr(file, '/');
|
||||
#ifdef _WIN32
|
||||
if (lastSlash == NULL)
|
||||
lastSlash = __builtin_strrchr(file, '\\');
|
||||
#endif
|
||||
if (lastSlash != NULL)
|
||||
return lastSlash + 1;
|
||||
return file;
|
||||
|
||||
Reference in New Issue
Block a user