Minor code streamlining

This commit is contained in:
Benny Baumann 2020-12-02 18:52:09 +01:00 committed by BenBE
parent 709821ff55
commit c6b66a75ea
2 changed files with 4 additions and 8 deletions

View File

@ -25,11 +25,7 @@ static const char* const MainFunctions[] = {"Help ", "Setup ", "Search", "Filt
void MainPanel_updateTreeFunctions(MainPanel* this, bool mode) { void MainPanel_updateTreeFunctions(MainPanel* this, bool mode) {
FunctionBar* bar = MainPanel_getFunctionBar(this); FunctionBar* bar = MainPanel_getFunctionBar(this);
if (mode) { FunctionBar_setLabel(bar, KEY_F(5), mode ? "Sorted" : "Tree ");
FunctionBar_setLabel(bar, KEY_F(5), "Sorted");
} else {
FunctionBar_setLabel(bar, KEY_F(5), "Tree ");
}
} }
void MainPanel_pidSearch(MainPanel* this, int ch) { void MainPanel_pidSearch(MainPanel* this, int ch) {

View File

@ -431,11 +431,11 @@ static void ProcessList_buildTree(ProcessList* this) {
} }
void ProcessList_sort(ProcessList* this) { void ProcessList_sort(ProcessList* this) {
if (!this->settings->treeView) { if (this->settings->treeView) {
Vector_insertionSort(this->processes);
} else {
ProcessList_updateTreeSet(this); ProcessList_updateTreeSet(this);
Vector_quickSortCustomCompare(this->processes, ProcessList_treeProcessCompare); Vector_quickSortCustomCompare(this->processes, ProcessList_treeProcessCompare);
} else {
Vector_insertionSort(this->processes);
} }
} }