mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 08:13:44 +01:00
FFstrbuf: remove ffStrbufCompAlphabetically
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
|
||||
const char* ffDetectDisksImpl(FFlist* disks);
|
||||
|
||||
static int compareDisks(const void* disk1, const void* disk2)
|
||||
static int compareDisks(const FFDisk* disk1, const FFDisk* disk2)
|
||||
{
|
||||
return ffStrbufCompAlphabetically(&((const FFDisk*) disk1)->mountpoint, &((const FFDisk*) disk2)->mountpoint);
|
||||
return ffStrbufComp(&disk1->mountpoint, &disk2->mountpoint);
|
||||
}
|
||||
|
||||
const char* ffDetectDisks(FFDiskOptions* options, FFlist* disks)
|
||||
@@ -18,7 +18,7 @@ const char* ffDetectDisks(FFDiskOptions* options, FFlist* disks)
|
||||
// For example for /boot/efi/bootmgr we need to check /boot/efi before /boot
|
||||
//Note that we sort alphabetically here for a better ordering when printing the list,
|
||||
// so the check must be done in reverse order
|
||||
ffListSort(disks, compareDisks);
|
||||
ffListSort(disks, (void*) compareDisks);
|
||||
FF_LIST_FOR_EACH(FFDisk, disk, *disks)
|
||||
{
|
||||
if(disk->bytesTotal == 0)
|
||||
|
||||
@@ -300,11 +300,6 @@ static inline int ffStrbufComp(const FFstrbuf* strbuf, const FFstrbuf* comp)
|
||||
return memcmp(strbuf->chars, comp->chars, length + 1);
|
||||
}
|
||||
|
||||
static inline int ffStrbufCompAlphabetically(const FFstrbuf* strbuf, const FFstrbuf* comp)
|
||||
{
|
||||
return strcmp(strbuf->chars, comp->chars);
|
||||
}
|
||||
|
||||
static inline FF_C_NODISCARD bool ffStrbufEqual(const FFstrbuf* strbuf, const FFstrbuf* comp)
|
||||
{
|
||||
return ffStrbufComp(strbuf, comp) == 0;
|
||||
|
||||
Reference in New Issue
Block a user