Pass const string ref

This commit is contained in:
aristocratos 2022-07-03 12:56:04 +02:00
parent 6b1b9f8142
commit 4818441817
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ using namespace Tools;
namespace Proc {
void proc_sorter(vector<proc_info>& proc_vec, string sorting, const bool reverse, const bool tree) {
void proc_sorter(vector<proc_info>& proc_vec, const string& sorting, const bool reverse, const bool tree) {
if (reverse) {
switch (v_index(sort_vector, sorting)) {
case 0: rng::stable_sort(proc_vec, rng::less{}, &proc_info::pid); break;

View File

@ -275,7 +275,7 @@ namespace Proc {
};
//* Sort vector of proc_info's
void proc_sorter(vector<proc_info>& proc_vec, string sorting, const bool reverse, const bool tree = false);
void proc_sorter(vector<proc_info>& proc_vec, const string& sorting, const bool reverse, const bool tree = false);
//* Recursive sort of process tree
void tree_sort(vector<tree_proc>& proc_vec, const string& sorting, const bool reverse, int& c_index, const int index_max, const bool collapsed = false);