Split boilerplate and platform-independent field comparison

This acheives two things:
- Allows for simple tie-breaking if values compare equal (needed to make sorting the tree-view stable)
- Allows for platform-dependent overriding of the sort-order for specific fields

Also fixes a small oversight on DragonFlyBSD when default-sorting.
This commit is contained in:
Benny Baumann
2020-12-18 22:12:26 +01:00
committed by BenBE
parent 2327260ee8
commit 77db240b48
8 changed files with 23 additions and 10 deletions

View File

@ -120,7 +120,7 @@ long DragonFlyBSDProcess_compareByKey(const Process* v1, const Process* v2, Proc
case JAIL:
return SPACESHIP_NULLSTR(p1->jname, p2->jname);
default:
return SPACESHIP_NULLSTR(v1->pid, v2->pid);
return Process_compareByKey_Base(v1, v2, key);
}
}