Rework enum ProcessField

Use only one enum instead of a global and a platform specific one.
Drop Platform_numberOfFields global variable.
Set known size of Process_fields array
This commit is contained in:
Christian Göttsche
2020-12-15 19:44:48 +01:00
committed by cgzones
parent d872e36308
commit 89473cc9ae
41 changed files with 208 additions and 175 deletions

View File

@ -518,7 +518,7 @@ long Process_compare(const void* v1, const void* v2) {
long Process_compareByKey_Base(const Process* p1, const Process* p2, ProcessField key) {
int r;
switch ((int) key) {
switch (key) {
case PERCENT_CPU:
case PERCENT_NORM_CPU:
return SPACESHIP_NUMBER(p2->percent_cpu, p1->percent_cpu);